mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
split is enough
This commit is contained in:
parent
46bde6af85
commit
53ec6b02a5
@ -125,7 +125,7 @@ def parse_address(netloc, default_port=8000):
|
|||||||
#get port
|
#get port
|
||||||
netloc = netloc.split(']')[-1]
|
netloc = netloc.split(']')[-1]
|
||||||
if ":" in netloc:
|
if ":" in netloc:
|
||||||
port = netloc.rsplit(':', 1)[1]
|
port = netloc.split(':', 1)[1]
|
||||||
if not port.isdigit():
|
if not port.isdigit():
|
||||||
raise RuntimeError("%r is not a valid port number." % port)
|
raise RuntimeError("%r is not a valid port number." % port)
|
||||||
port = int(port)
|
port = int(port)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user