Fix for Python3 map changed behavior
In Python3, map returns an iterator instead of list in Python2, which cause map "lazier" than before, wrap with list() force it running.
This commit is contained in:
@ -192,7 +192,7 @@ class IPNetwork(object):
|
||||
self._network_list_v6 = []
|
||||
if type(addrs) == str:
|
||||
addrs = addrs.split(',')
|
||||
map(self.add_network, addrs)
|
||||
list(map(self.add_network, addrs))
|
||||
|
||||
def add_network(self, addr):
|
||||
if addr is "":
|
||||
|
Reference in New Issue
Block a user