mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-42427: Use the errno attribute of OSError instead of args[0] (GH-23449)
This commit is contained in:
parent
bd8c22e1fa
commit
c4d45ee670
3 changed files with 11 additions and 11 deletions
|
@ -706,7 +706,7 @@ class SocketIO(io.RawIOBase):
|
|||
self._timeout_occurred = True
|
||||
raise
|
||||
except error as e:
|
||||
if e.args[0] in _blocking_errnos:
|
||||
if e.errno in _blocking_errnos:
|
||||
return None
|
||||
raise
|
||||
|
||||
|
@ -722,7 +722,7 @@ class SocketIO(io.RawIOBase):
|
|||
return self._sock.send(b)
|
||||
except error as e:
|
||||
# XXX what about EINTR?
|
||||
if e.args[0] in _blocking_errnos:
|
||||
if e.errno in _blocking_errnos:
|
||||
return None
|
||||
raise
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue