1
0

network: no assert for port number range check

This commit is contained in:
Sander van Grieken
2023-11-30 13:33:26 +01:00
parent 42f2eb3818
commit 70da74166c

View File

@@ -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: