[Python-checkins] cpython (merge 3.2 -> 3.3): Issue #16647: save socket error details in LMTP.connect()
andrew.svetlov
python-checkins at python.org
Mon Dec 17 18:08:12 CET 2012
http://hg.python.org/cpython/rev/6d805653843a
changeset: 80911:6d805653843a
branch: 3.3
parent: 80906:b8289a08d720
parent: 80910:1a2ead9faa3f
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Dec 17 18:55:10 2012 +0200
summary:
Issue #16647: save socket error details in LMTP.connect()
Patch by Serhiy Storchaka.
files:
Lib/smtplib.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -920,13 +920,13 @@
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:
self.sock.close()
self.sock = None
- raise socket.error(msg)
+ raise
(code, msg) = self.getreply()
if self.debuglevel > 0:
print('connect:', msg, file=stderr)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list