mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Remove unnecessary string trimming
This commit is contained in:
parent
e077bb5a18
commit
593f9b688c
1 changed files with 2 additions and 2 deletions
|
@ -74,11 +74,11 @@ def filepath(value):
|
|||
def list_of_ip_address(value):
|
||||
def ip_address(value):
|
||||
try:
|
||||
address, port = value.strip().rsplit(":", 1)
|
||||
address, port = value.rsplit(":", 1)
|
||||
return address.strip("[] "), int(port)
|
||||
except ValueError:
|
||||
raise ValueError("malformed IP address: %r" % value)
|
||||
return [ip_address(s.strip()) for s in value.split(",")]
|
||||
return [ip_address(s) for s in value.split(",")]
|
||||
|
||||
|
||||
def str_or_callable(value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue