💥 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:
1 parent
95441dafd4
commit
35e35d92a6
9 files changed
+21
-21
No files matched your search
@@ -30,7 +30,7 @@ def _git(args, cwd, hide_stderr=False):
|
||||
stderr=(subprocess.PIPE if hide_stderr else None),
|
||||
)
|
||||
break
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
e = sys.exc_info()[1]
|
||||
if e.errno == errno.ENOENT:
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user