File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ def from_cache(self, cache_location):
114
114
response = pickle .load (f )
115
115
if not isinstance (response , requests .Response ):
116
116
response = None
117
- except OSError : # TODO: change to FileNotFoundError once drop py2 support
117
+ except FileNotFoundError :
118
118
response = None
119
119
if response :
120
120
log .debug ("Retrieving data from {0}" .format (request_file ))
@@ -130,8 +130,8 @@ def remove_cache_file(self, cache_location):
130
130
if os .path .exists (request_file ):
131
131
os .remove (request_file )
132
132
else :
133
- raise OSError (f"Tried to remove cache file { request_file } but "
134
- "it does not exist" )
133
+ raise FileNotFoundError (f"Tried to remove cache file { request_file } but "
134
+ "it does not exist" )
135
135
136
136
137
137
class LoginABCMeta (abc .ABCMeta ):
You can’t perform that action at this time.
0 commit comments