mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
debug ipaddress.ip_address TypeError
This commit is contained in:
parent
080ab702c1
commit
8bd82f44e4
@ -1962,8 +1962,12 @@ def parse_host_port(host_port):
|
||||
if port and ":" in port:
|
||||
raise ValueError('too many ":" separators in host:port "{}"'.format(host_port))
|
||||
try:
|
||||
host = ipaddress.ip_address(host)
|
||||
host_ip = ipaddress.ip_address(host)
|
||||
host = host_ip
|
||||
except ValueError:
|
||||
log.debug('"%s" Not an IP address? Assuming it is a hostname.', host)
|
||||
except TypeError as _e_:
|
||||
log.warn('"%s" generated a TypeError exception', host)
|
||||
raise _e_
|
||||
|
||||
return host, port
|
||||
|
Loading…
Reference in New Issue
Block a user