Commit 4372c6c1 authored by Thomas Bouve's avatar Thomas Bouve Committed by Brian May

Hyphen in hostname fix

parent 4e945ca4
...@@ -32,7 +32,7 @@ def parse_subnetport(s): ...@@ -32,7 +32,7 @@ def parse_subnetport(s):
if s.count(':') > 1: if s.count(':') > 1:
rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$' rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$'
else: else:
rx = r'([\w\.]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$' rx = r'([\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
m = re.match(rx, s) m = re.match(rx, s)
if not m: if not m:
...@@ -63,7 +63,7 @@ def parse_ipport(s): ...@@ -63,7 +63,7 @@ def parse_ipport(s):
elif ']' in s: elif ']' in s:
rx = r'(?:\[([^]]+)])(?::(\d+))?$' rx = r'(?:\[([^]]+)])(?::(\d+))?$'
else: else:
rx = r'([\w\.]+)(?::(\d+))?$' rx = r'([\w\.\-]+)(?::(\d+))?$'
m = re.match(rx, s) m = re.match(rx, s)
if not m: if not m:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment