commit | c4d45ee670c09d4f6da709df072ec80cb7dfad22 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Sun Nov 22 10:28:34 2020 +0200 |
committer | GitHub <noreply@github.com> | Sun Nov 22 10:28:34 2020 +0200 |
tree | ffa3ba91afd9e93b19ada3967236529a6c1b3fd9 | |
parent | bd8c22e1fa8f8f6e31ee083a8b9321a2c324f02f [diff] [blame] |
bpo-42427: Use the errno attribute of OSError instead of args[0] (GH-23449)
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 @@ # 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)