diff --git a/chaos_monkey/network/range.py b/chaos_monkey/network/range.py index 4fa2f423c..0dfcf69ad 100644 --- a/chaos_monkey/network/range.py +++ b/chaos_monkey/network/range.py @@ -67,5 +67,9 @@ class FixedRange(NetworkRange): return "" % (",".join(self._fixed_addresses)) def _get_range(self): - return [struct.unpack(">L", socket.inet_aton(address))[0] - for address in self._fixed_addresses] + address_range = [] + for address in self._fixed_addresses: + if not address: # Empty string + continue + address_range.append(struct.unpack(">L", socket.inet_aton(address))[0]) + return address_range