Skip to content

Commit

Permalink
Trim all (ASCII) whitespace characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed May 19, 2020
1 parent 1f8cb8e commit 6158fb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radicale/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import contextlib
import math
import os
import string
from collections import OrderedDict
from configparser import RawConfigParser

Expand Down Expand Up @@ -75,7 +76,7 @@ def list_of_ip_address(value):
def ip_address(value):
try:
address, port = value.rsplit(":", 1)
return address.strip("[] "), int(port)
return address.strip(string.whitespace + "[]"), int(port)
except ValueError:
raise ValueError("malformed IP address: %r" % value)
return [ip_address(s) for s in value.split(",")]
Expand Down

0 comments on commit 6158fb9

Please sign in to comment.