diff options
author | Guido van Rossum <guido@python.org> | 1994-02-22 16:06:02 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-02-22 16:06:02 (GMT) |
commit | 76ca3c17f0922c17b6da43f7345b4f26cff854bc (patch) | |
tree | 355c6c057cdaa0ad3bb4ddc682191e9659e4729d /Lib/httplib.py | |
parent | 9f14863053676292d9ea1a3d0ae792c9c568fd1e (diff) | |
download | cpython-76ca3c17f0922c17b6da43f7345b4f26cff854bc.zip cpython-76ca3c17f0922c17b6da43f7345b4f26cff854bc.tar.gz cpython-76ca3c17f0922c17b6da43f7345b4f26cff854bc.tar.bz2 |
Fix bug with somtimes uninitialized port
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index ea6e565..d494e21 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -56,10 +56,11 @@ class HTTP: port = args[0] else: i = string.find(host, ':') + port = None if i >= 0: host, port = host[:i], host[i+1:] try: port = string.atoi(port) - except string.atoi_error: port = None + except string.atoi_error: pass if not port: port = HTTP_PORT self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if self.debuglevel > 0: print 'connect:', (host, port) |