diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-11-22 08:28:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 08:28:34 (GMT) |
commit | c4d45ee670c09d4f6da709df072ec80cb7dfad22 (patch) | |
tree | ffa3ba91afd9e93b19ada3967236529a6c1b3fd9 /Lib/socket.py | |
parent | bd8c22e1fa8f8f6e31ee083a8b9321a2c324f02f (diff) | |
download | cpython-c4d45ee670c09d4f6da709df072ec80cb7dfad22.zip cpython-c4d45ee670c09d4f6da709df072ec80cb7dfad22.tar.gz cpython-c4d45ee670c09d4f6da709df072ec80cb7dfad22.tar.bz2 |
bpo-42427: Use the errno attribute of OSError instead of args[0] (GH-23449)
Diffstat (limited to 'Lib/socket.py')
-rwxr-xr-x | Lib/socket.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index 54a3807..5276cc8 100755 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -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 |