mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
expose error in tests
Error Message object of type 'NoneType' has no len() Stacktrace Traceback (most recent call last): File "/tmp/kitchen/testing/tests/unit/utils/test_network.py", line 225, in test_parse_host_port host, port = network.parse_host_port(host_port) File "/tmp/kitchen/testing/salt/utils/network.py", line 1957, in parse_host_port raise _e_ TypeError: object of type 'NoneType' has no len()
This commit is contained in:
parent
0a92c4691d
commit
02b825ec3c
1 changed files with 3 additions and 0 deletions
|
@ -1969,5 +1969,8 @@ def parse_host_port(host_port):
|
|||
host = host_ip
|
||||
except ValueError:
|
||||
log.debug('"%s" Not an IP address? Assuming it is a hostname.', host)
|
||||
if host != sanitize_host(host):
|
||||
log.error('bad hostname: "%s"', host)
|
||||
raise ValueError('bad hostname: "{}"'.format(host))
|
||||
|
||||
return host, port
|
||||
|
|
Loading…
Add table
Reference in a new issue