# Dump everything in the logs
log.debug("Static hosts:")
- for hostname, addresses in hosts.items():
- log.debug(" %-20s : %s" % (hostname, ", ".join(addresses)))
+ for name in hosts:
+ log.debug(" %-20s : %s" % (name, ", ".join(hosts[name])))
return hosts
address = ipaddress.ip_address(self.ipaddr)
- for subnet, domain in subnets.items():
+ for subnet in subnets:
if address in subnet:
- return domain
+ return subnets[subnet]
# Fall back to localdomain if no match could be found
return "localdomain"