Replace all instances of EnvironmentError with OSError

According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
This commit is contained in:
Luflosi
2020-01-09 16:59:41 +01:00
parent 789d649b5c
commit 527ff0238a
14 changed files with 22 additions and 22 deletions

View File

@@ -333,7 +333,7 @@ SPECIAL_SOURCES = {
def newer(dest, *sources):
try:
dtime = os.path.getmtime(dest)
except EnvironmentError:
except OSError:
return True
for s in sources:
with suppress(FileNotFoundError):