ignore empty strings in fixed address list
empty address string is used in the sample config for empty strings touple, which shouldn't cause an exception
This commit is contained in:
parent
e1cd671e0a
commit
3990806d8c
|
@ -67,5 +67,9 @@ class FixedRange(NetworkRange):
|
|||
return "<FixedRange %s>" % (",".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
|
||||
|
|
Loading…
Reference in New Issue