client: fixed localhost as ip_addr, pt2

This commit is contained in:
Artem30801
2020-10-06 00:31:29 +03:00
parent f15d61779e
commit 1d20302466

View File

@@ -28,9 +28,7 @@ def is_preset_param(value):
return is_boolean(parsed[0]), is_integer(parsed[1], min=0)
def is_ip_or_local(value):
if value == 'localhost':
return True
return is_ip_addr(value)
return value if value == 'localhost' else is_ip_addr(value)
class ValidationError(ValueError):