File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 2
2
import os
3
3
import warnings
4
4
import time
5
- import errno
6
5
import logging
7
6
8
7
import msal
9
8
10
9
from .cache_lock import CrossPlatLock
11
10
from .persistence import (
12
- _mkdir_p , FilePersistence ,
11
+ _mkdir_p , PersistenceNotFound , FilePersistence ,
13
12
FilePersistenceWithDataProtection , KeychainPersistence )
14
13
15
14
@@ -35,10 +34,10 @@ def _reload_if_necessary(self):
35
34
if self ._last_sync < self ._persistence .time_last_modified ():
36
35
self .deserialize (self ._persistence .load ())
37
36
self ._last_sync = time .time ()
38
- except IOError as exp :
39
- if exp . errno != errno . ENOENT :
40
- raise
41
- # Otherwise, from cache's perspective, a nonexistent file is a NO-OP
37
+ except PersistenceNotFound :
38
+ # From cache's perspective, a nonexistent persistence is a NO-OP.
39
+ pass
40
+ # However, existing data unable to be decrypted will still be bubbled up.
42
41
43
42
def modify (self , credential_type , old_entry , new_key_value_pairs = None ):
44
43
with CrossPlatLock (self ._lock_location ):
You can’t perform that action at this time.
0 commit comments