network: no assert for port number range check
This commit is contained in:
@@ -185,10 +185,9 @@ def deserialize_proxy(s: Optional[str], user: str = None, password: str = None)
|
||||
|
||||
def is_valid_port(ps: str):
|
||||
try:
|
||||
assert 0 < int(ps) < 65535
|
||||
except (ValueError, AssertionError):
|
||||
return 0 < int(ps) < 65535
|
||||
except ValueError:
|
||||
return False
|
||||
return True
|
||||
|
||||
def is_valid_host(ph: str):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user