Loading generate-dhcpd-conf +4 −4 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ def addr_of(addrs, dev : str) -> ipaddress.IPv4Interface: for addr in addrs: if addr['ifname'] != dev: continue if len(addr['addr_info']) != 1: raise ValueError('only exactly one address on dev is supported') #if len(addr['addr_info']) != 1: # raise ValueError('only exactly one address on dev is supported') info = addr['addr_info'][0] return ipaddress.IPv4Interface((info['local'], info['prefixlen'])) raise ValueError('dev {0} not found'.format(dev)) Loading Loading
generate-dhcpd-conf +4 −4 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ def addr_of(addrs, dev : str) -> ipaddress.IPv4Interface: for addr in addrs: if addr['ifname'] != dev: continue if len(addr['addr_info']) != 1: raise ValueError('only exactly one address on dev is supported') #if len(addr['addr_info']) != 1: # raise ValueError('only exactly one address on dev is supported') info = addr['addr_info'][0] return ipaddress.IPv4Interface((info['local'], info['prefixlen'])) raise ValueError('dev {0} not found'.format(dev)) Loading