Hyphen in hostname fix

This commit is contained in:
Thomas Bouve 2019-02-13 20:01:09 +01:00 committed by Brian May
parent 4e945ca4de
commit 4372c6c117

View File

@ -32,7 +32,7 @@ def parse_subnetport(s):
if s.count(':') > 1:
rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$'
else:
rx = r'([\w\.]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
rx = r'([\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
m = re.match(rx, s)
if not m:
@ -63,7 +63,7 @@ def parse_ipport(s):
elif ']' in s:
rx = r'(?:\[([^]]+)])(?::(\d+))?$'
else:
rx = r'([\w\.]+)(?::(\d+))?$'
rx = r'([\w\.\-]+)(?::(\d+))?$'
m = re.match(rx, s)
if not m: