mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-10-15 01:47:08 +00:00
Sync: Don't fail when git cookies can't be loaded
If the git cookies file fails to load, use a default cookie jar instead. Bug: Issue 207 Change-Id: I7cb326c204f2784ab4dbd13801b3186667af5b78
This commit is contained in:
1 parent
f231db11a2
commit
b1ad2190a2
1 file changed
+4
-1
+4
-1
@@ -925,7 +925,10 @@ class PersistentTransport(xmlrpc.client.Transport):
|
||||
tmpcookiefile.flush()
|
||||
|
||||
cookiejar = cookielib.MozillaCookieJar(tmpcookiefile.name)
|
||||
cookiejar.load()
|
||||
try:
|
||||
cookiejar.load()
|
||||
except cookielib.LoadError:
|
||||
cookiejar = cookielib.CookieJar()
|
||||
finally:
|
||||
tmpcookiefile.close()
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user