From 75a399874fbe8a1c055f0a1ee756115d9727c4ef Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Thu, 19 Oct 2017 17:04:11 +0300 Subject: [PATCH] fix ip address unicode bug --- chaos_monkey/network/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chaos_monkey/network/info.py b/chaos_monkey/network/info.py index 0c841dc9f..27afbb4c4 100644 --- a/chaos_monkey/network/info.py +++ b/chaos_monkey/network/info.py @@ -138,7 +138,7 @@ def get_ips_from_interfaces(): res = [] ifs = get_host_subnets() for net_interface in ifs: - host_addr = ipaddress.ip_address(net_interface['addr']) + host_addr = ipaddress.ip_address(u"%s" % net_interface['addr']) ip_interface = ipaddress.ip_interface(u"%s/%s" % (net_interface['addr'], net_interface['netmask'])) # limit subnet scans to class C only if ip_interface.network.num_addresses > 255: