kopia lustrzana https://github.com/jupyterhub/repo2docker
Add check for port sepc > 65535
rodzic
9e6dc8f7d7
commit
7cb4555018
|
@ -90,10 +90,13 @@ def validate_and_generate_port_mapping(port_mappings):
|
||||||
"""
|
"""
|
||||||
def check_port(port):
|
def check_port(port):
|
||||||
try:
|
try:
|
||||||
int(port)
|
p = int(port)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise ValueError('Port specification "{}" has '
|
raise ValueError('Port specification "{}" has '
|
||||||
'an invalid port.'.format(mapping))
|
'an invalid port.'.format(mapping))
|
||||||
|
if p > 65535:
|
||||||
|
raise ValueError('Port specification "{}" specifies '
|
||||||
|
'a port above 65535.'.format(mapping))
|
||||||
return port
|
return port
|
||||||
|
|
||||||
def check_port_string(p):
|
def check_port_string(p):
|
||||||
|
|
Ładowanie…
Reference in New Issue