mirror of https://github.com/python/cpython
Revert a change I accidentally checked in together with Ping's
"smallest patch ever".
This commit is contained in:
parent
b35ffc0417
commit
fd97a919ff
|
@ -332,10 +332,7 @@ class HTTPConnection:
|
||||||
if port is None:
|
if port is None:
|
||||||
i = host.find(':')
|
i = host.find(':')
|
||||||
if i >= 0:
|
if i >= 0:
|
||||||
try:
|
port = int(host[i+1:])
|
||||||
port = int(host[i+1:])
|
|
||||||
except ValueError, msg:
|
|
||||||
raise socket.error, str(msg)
|
|
||||||
host = host[:i]
|
host = host[:i]
|
||||||
else:
|
else:
|
||||||
port = self.default_port
|
port = self.default_port
|
||||||
|
|
Loading…
Reference in New Issue