From: Andrew Svetlov Date: Mon, 17 Dec 2012 16:55:10 +0000 (+0200) Subject: Issue #16647: save socket error details in LMTP.connect() X-Git-Tag: v3.3.1rc1~516 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b69824de9860899372d3b816a0601889e2a0031;p=python Issue #16647: save socket error details in LMTP.connect() Patch by Serhiy Storchaka. --- 3b69824de9860899372d3b816a0601889e2a0031 diff --cc Lib/smtplib.py index d37b0e247d,e06a9be741..c949d77b51 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@@ -918,9 -891,8 +918,9 @@@ class LMTP(SMTP) # Handle Unix-domain sockets. try: self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.file = None self.sock.connect(host) - except socket.error as msg: + except socket.error: if self.debuglevel > 0: print('connect fail:', host, file=stderr) if self.sock: