Pull request #15: fix endpoint regex
Merge in RR/pyinfra from fix_endpoint_regex to master * commit '344c92c4d2e46d5adbfa385e4516322df86406e3': fix endpoint regex
This commit is contained in:
commit
2a1d6c4973
@ -9,7 +9,7 @@ from pyinfra.exceptions import InvalidEndpoint
|
||||
|
||||
def parse_endpoint(endpoint):
|
||||
# FIXME Greedy matching (.+) since we get random storage names on kubernetes (eg http://red-research-headless:9000)
|
||||
endpoint_pattern = r"(?P<protocol>https?)://(?P<address>(?:(?:(?:\d{1,3}\.){3}\d{1,3})|.+)(?:\:\d+)?)"
|
||||
endpoint_pattern = r"(?P<protocol>https?)*(?:://)*(?P<address>(?:(?:(?:\d{1,3}\.){3}\d{1,3})|.+)(?:\:\d+)?)"
|
||||
|
||||
match = re.match(endpoint_pattern, endpoint)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user