mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Convert raise to call exception class. Add whitespace.
This commit is contained in:
parent
4e54730ed5
commit
fbd79944a8
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ class HTTPConnection:
|
||||||
try:
|
try:
|
||||||
port = int(host[i+1:])
|
port = int(host[i+1:])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise InvalidURL, "nonnumeric port: '%s'"%host[i+1:]
|
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
|
||||||
host = host[:i]
|
host = host[:i]
|
||||||
else:
|
else:
|
||||||
port = self.default_port
|
port = self.default_port
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue