Move from python2 compliant IOError and EnvironmentError to python3-only OSError (#48764)
* IOError -> OSError * also do EnvironmentError
This commit is contained in:
@@ -391,7 +391,7 @@ def _poll_lock(self, op: int) -> bool:
|
||||
|
||||
return True
|
||||
|
||||
except IOError as e:
|
||||
except OSError as e:
|
||||
# EAGAIN and EACCES == locked by another process (so try again)
|
||||
if e.errno not in (errno.EAGAIN, errno.EACCES):
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user