mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
connection: Fix traceback on loading an invalid cookiejar file
Ignore the error and overwrite the cookiejar file with new content after we get a new cookie from server.
This commit is contained in:
parent
18f4d88231
commit
efa2c09e2e
@ -451,7 +451,10 @@ class CookieJarAuthHandler(AuthHandlerBase):
|
||||
pass
|
||||
jar = http.cookiejar.LWPCookieJar(self.cookiejar_path)
|
||||
if os.path.isfile(self.cookiejar_path):
|
||||
jar.load()
|
||||
try:
|
||||
jar.load()
|
||||
except http.cookiejar.LoadError:
|
||||
pass
|
||||
self.COOKIEJARS[self.cookiejar_path] = jar
|
||||
return jar
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user