Move from python2 compliant IOError and EnvironmentError to python3-only OSError (#48764)

* IOError -> OSError

* also do EnvironmentError
This commit is contained in:
Harmen Stoppels
2025-01-30 18:32:57 +01:00
committed by GitHub
parent 6e046b04c7
commit b02dcf697d
22 changed files with 41 additions and 47 deletions

View File

@@ -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