add missing ip6_addr and ip_addr defaults of []
This commit is contained in:
parent
4a86a3d5be
commit
261796483c
1 changed files with 2 additions and 2 deletions
|
@ -59,8 +59,8 @@ class Network():
|
|||
logging.debug('Ignore interface {interface}'.format(interface=interface))
|
||||
continue
|
||||
|
||||
ip_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET)
|
||||
ip6_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET6)
|
||||
ip_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET, [])
|
||||
ip6_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET6, [])
|
||||
|
||||
# netifaces returns a ipv6 netmask that netaddr does not understand.
|
||||
# this strips the netmask down to the correct format for netaddr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue