Skip to content

Commit e1e20d7

Browse files
authored
Alias FileNotFoundError to IOError and OSError
This does make catching this error rather broad on Python 2.7
1 parent 5569c80 commit e1e20d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cachecontrol/caches/file_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
FileNotFoundError
1010
except NameError:
1111
# py2.X
12-
FileNotFoundError = OSError
12+
FileNotFoundError = (IOError, OSError)
1313

1414

1515
def _secure_open_write(filename, fmode):

0 commit comments

Comments
 (0)