mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix minion start issue
This commit is contained in:
parent
1abffb20b9
commit
c3fa82a927
@ -1935,7 +1935,7 @@ def parse_host_port(host_port):
|
|||||||
if _s_[0] == "[":
|
if _s_[0] == "[":
|
||||||
if "]" in host_port:
|
if "]" in host_port:
|
||||||
host, _s_ = _s_.lstrip("[").rsplit("]", 1)
|
host, _s_ = _s_.lstrip("[").rsplit("]", 1)
|
||||||
host = ipaddress.IPv6Address(host)
|
host = ipaddress.IPv6Address(host).compressed
|
||||||
if _s_[0] == ":":
|
if _s_[0] == ":":
|
||||||
port = int(_s_.lstrip(":"))
|
port = int(_s_.lstrip(":"))
|
||||||
else:
|
else:
|
||||||
@ -1953,7 +1953,7 @@ def parse_host_port(host_port):
|
|||||||
host = _s_
|
host = _s_
|
||||||
try:
|
try:
|
||||||
if not isinstance(host, ipaddress._BaseAddress):
|
if not isinstance(host, ipaddress._BaseAddress):
|
||||||
host_ip = ipaddress.ip_address(host)
|
host_ip = ipaddress.ip_address(host).compressed
|
||||||
host = host_ip
|
host = host_ip
|
||||||
except ValueError:
|
except ValueError:
|
||||||
log.debug('"%s" Not an IP address? Assuming it is a hostname.', host)
|
log.debug('"%s" Not an IP address? Assuming it is a hostname.', host)
|
||||||
|
Loading…
Reference in New Issue
Block a user