diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-07-31 08:40:21 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-07-31 08:40:21 (GMT) |
commit | 2ad2569c721c6179667a16d1a6f2df4f93606636 (patch) | |
tree | 93e1f4c5d1754aae38a36105bc1e051025bb65ac /Lib/smtplib.py | |
parent | 7d9ed726fb6ec15dbfb8e922d35aa8816cbd0b0c (diff) | |
download | cpython-2ad2569c721c6179667a16d1a6f2df4f93606636.zip cpython-2ad2569c721c6179667a16d1a6f2df4f93606636.tar.gz cpython-2ad2569c721c6179667a16d1a6f2df4f93606636.tar.bz2 |
Initialize msg to avoid unbound locals.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-x | Lib/smtplib.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 27cda40..3d28b0d 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -217,6 +217,7 @@ class SMTP: raise socket.error, "nonnumeric port" 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 try: |