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 @@ def __init__(self, server, conn, addr, data_size_limit=DATA_SIZE_DEFAULT,
# 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)