[Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.55,1.56 httplib.py,1.37,1.38 poplib.py,1.16,1.17 smtplib.py,1.38,1.39 telnetlib.py,1.13,1.14
Martin v. L?wis
loewis@users.sourceforge.net
Tue, 31 Jul 2001 01:40:23 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv9067
Modified Files:
ftplib.py httplib.py poplib.py smtplib.py telnetlib.py
Log Message:
Initialize msg to avoid unbound locals.
Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** ftplib.py 2001/07/26 13:37:33 1.55
--- ftplib.py 2001/07/31 08:40:21 1.56
***************
*** 116,119 ****
--- 116,120 ----
if port: self.port = port
self.passiveserver = 0
+ msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
***************
*** 271,274 ****
--- 272,276 ----
def makeport(self):
'''Create a new socket and send a PORT command for it.'''
+ msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(None, 0, self.af, socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
af, socktype, proto, canonname, sa = res
Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** httplib.py 2001/07/26 13:37:33 1.37
--- httplib.py 2001/07/31 08:40:21 1.38
***************
*** 358,361 ****
--- 358,362 ----
def connect(self):
"""Connect to the host and port specified in __init__."""
+ msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
Index: poplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/poplib.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** poplib.py 2001/07/26 13:37:33 1.16
--- poplib.py 2001/07/31 08:40:21 1.17
***************
*** 76,79 ****
--- 76,80 ----
self.host = host
self.port = port
+ msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** smtplib.py 2001/07/26 13:37:33 1.38
--- smtplib.py 2001/07/31 08:40:21 1.39
***************
*** 218,221 ****
--- 218,222 ----
if not port: port = SMTP_PORT
if self.debuglevel > 0: print 'connect:', (host, port)
+ msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
Index: telnetlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** telnetlib.py 2001/07/26 13:37:33 1.13
--- telnetlib.py 2001/07/31 08:40:21 1.14
***************
*** 137,140 ****
--- 137,141 ----
self.host = host
self.port = port
+ msg = "getaddrinfo returns an empty list"
for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res