add missing ip6_addr and ip_addr defaults of []

This commit is contained in:
Thomas Davis 2019-08-29 08:18:58 -07:00
parent 4a86a3d5be
commit 261796483c

View file

@ -59,8 +59,8 @@ class Network():
logging.debug('Ignore interface {interface}'.format(interface=interface)) logging.debug('Ignore interface {interface}'.format(interface=interface))
continue continue
ip_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET) ip_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET, [])
ip6_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET6) ip6_addr = netifaces.ifaddresses(interface).get(netifaces.AF_INET6, [])
# netifaces returns a ipv6 netmask that netaddr does not understand. # netifaces returns a ipv6 netmask that netaddr does not understand.
# this strips the netmask down to the correct format for netaddr, # this strips the netmask down to the correct format for netaddr,