[Python-checkins] python/dist/src/Lib smtplib.py,1.67,1.68

jlgijsbers at users.sourceforge.net jlgijsbers at users.sourceforge.net
Sun Jan 16 14:04:34 CET 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3331

Modified Files:
	smtplib.py 
Log Message:
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.


Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- smtplib.py	8 Jan 2005 14:12:27 -0000	1.67
+++ smtplib.py	16 Jan 2005 13:04:30 -0000	1.68
@@ -290,10 +290,10 @@
             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



More information about the Python-checkins mailing list