Quickfix endpoint parsing bug
This commit is contained in:
parent
55be1c345b
commit
985301330d
@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
from minio import Minio
|
||||
@ -7,7 +8,8 @@ from pyinfra.exceptions import InvalidEndpoint
|
||||
|
||||
|
||||
def parse_endpoint(endpoint):
|
||||
endpoint_pattern = r"(?P<protocol>https?)://(?P<address>(?:(?:(?:\d{1,3}\.){3}\d{1,3})|(?:\w|\.)+)(?:\:\d+)?)"
|
||||
# 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+)?)"
|
||||
|
||||
match = re.match(endpoint_pattern, endpoint)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user