summaryrefslogtreecommitdiffstats
path: root/Lib/smtpd.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-11-22 08:28:34 (GMT)
committerGitHub <noreply@github.com>2020-11-22 08:28:34 (GMT)
commitc4d45ee670c09d4f6da709df072ec80cb7dfad22 (patch)
treeffa3ba91afd9e93b19ada3967236529a6c1b3fd9 /Lib/smtpd.py
parentbd8c22e1fa8f8f6e31ee083a8b9321a2c324f02f (diff)
downloadcpython-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-xLib/smtpd.py2
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)