File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/azure-cli-core/azure/cli/core/auth Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ def load(self):
4242 logger .debug ("load: %s" , self .filename )
4343 try :
4444 self .data = self ._load ()
45- except ( pickle . UnpicklingError , EOFError ) as ex :
46- # We still get exception after retry:
45+ except Exception as ex : # pylint: disable=broad-exception-caught
46+ # If we still get exception after retry, ignore all types of exceptions and use a new cache.
4747 # - pickle.UnpicklingError is caused by corrupted cache file, perhaps due to concurrent writes.
4848 # - EOFError is caused by empty cache file created by other az instance, but hasn't been filled yet.
49+ # - AttributeError is caused by reading cache generated by different MSAL versions.
4950 logger .debug ("Failed to load cache: %s. Using a fresh one." , ex )
5051 self .data = {} # Ignore a non-existing or corrupted http_cache
5152
You can’t perform that action at this time.
0 commit comments