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/smtpd.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/smtpd.py')
-rwxr-xr-x | Lib/smtpd.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py index 8f1a22e..1e2adc8 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -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) |