equal
deleted
inserted
replaced
64 if ip in by_ip : |
64 if ip in by_ip : |
65 raise ValueError("%s: duplicate ip: %s: %s" % (fqdn, ip, by_ip[ip])) |
65 raise ValueError("%s: duplicate ip: %s: %s" % (fqdn, ip, by_ip[ip])) |
66 else : |
66 else : |
67 by_ip[ip] = fqdn |
67 by_ip[ip] = fqdn |
68 |
68 |
69 for ip in prefix.iterhosts() : |
69 if options.unknown_host : |
|
70 # enumerate all of them |
|
71 iter_ips = prefix.iterhosts() |
|
72 else : |
|
73 iter_ips = sorted(by_ip) |
|
74 |
|
75 for ip in iter_ips : |
70 if ip in by_ip : |
76 if ip in by_ip : |
71 fqdn = by_ip[ip] |
77 fqdn = by_ip[ip] |
72 elif options.unknown_host : |
78 elif options.unknown_host : |
73 fqdn = pvl.dns.zone.fqdn(options.unknown_host, options.hosts_domain) |
79 fqdn = pvl.dns.zone.fqdn(options.unknown_host, options.hosts_domain) |
74 else : |
80 else : |