try to debug error in tests (revert me)

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:
Jeremy McMillan 2019-01-08 17:43:46 -06:00 committed by Pedro Algarvio
parent 2f8ca47549
commit 35410dde5c

View file

@ -1968,8 +1968,9 @@ def parse_host_port(host_port):
host = host_ip
except ValueError:
log.debug('"%s" Not an IP address? Assuming it is a hostname.', host)
except TypeError as _e_:
log.error('"%s" generated a TypeError exception', host)
raise _e_
# Todo: uncomment and handle
# except TypeError as _e_:
# log.error('"%s" generated a TypeError exception', host)
# raise _e_
return host, port