💥 Use OSError as the general system-related exception

According to PEP 3151, OSError can be used for all system-related exceptions and thus replace IOError, EnvironmentError, socket.error, etc.
This commit is contained in:
Miroslav Šedivý committed 2021-01-25 18:04:47 +01:00
1 parent 95441dafd4
commit 35e35d92a6
9 files changed
+21 -21

No files matched your search

@@ -153,7 +153,7 @@ def _git(args, cwd, git_executable=None):
command = [c] + args
try:
return _execute(command, cwd=cwd)
except EnvironmentError:
except OSError:
e = sys.exc_info()[1]
if e.errno == errno.ENOENT:
continue