diff options
author | Johannes Gijsbers <jlg@dds.nl> | 2005-01-16 13:04:30 (GMT) |
---|---|---|
committer | Johannes Gijsbers <jlg@dds.nl> | 2005-01-16 13:04:30 (GMT) |
commit | 5954623bc052ab17799a6b3ffcaaec8d99d977f5 (patch) | |
tree | fc46af23c0499b8b4c716e982daa38f9823a80e7 /Lib/smtplib.py | |
parent | fe33d0ba87f5468b50f939724b303969711f3be5 (diff) | |
download | cpython-5954623bc052ab17799a6b3ffcaaec8d99d977f5.zip cpython-5954623bc052ab17799a6b3ffcaaec8d99d977f5.tar.gz cpython-5954623bc052ab17799a6b3ffcaaec8d99d977f5.tar.bz2 |
Patch #1100140: improved smtp connect debugging
Don't print the same (host, port) tuple thrice when debugging, but first print
(host, port), then (ip, port) and then the error message.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-x | Lib/smtplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 61c3577..52a2e1f 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -290,10 +290,10 @@ class SMTP: af, socktype, proto, canonname, sa = res try: self.sock = socket.socket(af, socktype, proto) - if self.debuglevel > 0: print>>stderr, 'connect:', (host, port) + if self.debuglevel > 0: print>>stderr, 'connect:', sa self.sock.connect(sa) except socket.error, msg: - if self.debuglevel > 0: print>>stderr, 'connect fail:', (host, port) + if self.debuglevel > 0: print>>stderr, 'connect fail:', msg if self.sock: self.sock.close() self.sock = None |