mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +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:
parent
f231db11a2
commit
b1ad2190a2
@ -925,7 +925,10 @@ class PersistentTransport(xmlrpc.client.Transport):
|
|||||||
tmpcookiefile.flush()
|
tmpcookiefile.flush()
|
||||||
|
|
||||||
cookiejar = cookielib.MozillaCookieJar(tmpcookiefile.name)
|
cookiejar = cookielib.MozillaCookieJar(tmpcookiefile.name)
|
||||||
|
try:
|
||||||
cookiejar.load()
|
cookiejar.load()
|
||||||
|
except cookielib.LoadError:
|
||||||
|
cookiejar = cookielib.CookieJar()
|
||||||
finally:
|
finally:
|
||||||
tmpcookiefile.close()
|
tmpcookiefile.close()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user