mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +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
|
@ -163,7 +163,7 @@ class SMTPChannel(asynchat.async_chat):
|
|||
# a race condition may occur if the other end is closing
|
||||
# before we can get the peername
|
||||
self.close()
|
||||
if err.args[0] != errno.ENOTCONN:
|
||||
if err.errno != errno.ENOTCONN:
|
||||
raise
|
||||
return
|
||||
print('Peer:', repr(self.peer), file=DEBUGSTREAM)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue