Skip to content

Commit 4fd3f40

Browse files
authored
Merge pull request #439 from AzureAD/http-cache-pattern
Fine tune http_cache usage pattern
2 parents e642b92 + b1a7802 commit 4fd3f40

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

msal/application.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,8 @@ def __init__(
377377
with open(http_cache_filename, "rb") as f:
378378
persisted_http_cache = pickle.load(f) # Take a snapshot
379379
except (
380-
IOError, # A non-exist http cache file
380+
FileNotFoundError, # Or IOError in Python 2
381381
pickle.UnpicklingError, # A corrupted http cache file
382-
EOFError, # An empty http cache file
383-
AttributeError, ImportError, IndexError, # Other corruption
384382
):
385383
persisted_http_cache = {} # Recover by starting afresh
386384
atexit.register(lambda: pickle.dump(

0 commit comments

Comments
 (0)