Fix assorted bugs found by pylint

This commit is contained in:
Jakub Hrozek
2011-01-25 18:46:26 +01:00
committed by Simo Sorce
parent 27da394c44
commit ab2ca8022e
17 changed files with 19 additions and 46 deletions

View File

@@ -82,7 +82,7 @@ def verify_dns_records(host_name, responses, resaddr, family):
rs = dnsclient.query(dns_addr.reverse_dns, dnsclient.DNS_C_IN, dnsclient.DNS_T_PTR)
if len(rs) == 0:
raise RuntimeError("Cannot find Reverse Address for %s (%s)" % (host_name, addr))
raise RuntimeError("Cannot find Reverse Address for %s (%s)" % (host_name, dns_addr.format()))
rev = None
for rsn in rs:
@@ -91,7 +91,7 @@ def verify_dns_records(host_name, responses, resaddr, family):
break
if rev == None:
raise RuntimeError("Cannot find Reverse Address for %s (%s)" % (host_name, addr))
raise RuntimeError("Cannot find Reverse Address for %s (%s)" % (host_name, dns_addr.format()))
if rec.dns_name != rev.rdata.ptrdname:
raise RuntimeError("The DNS forward record %s does not match the reverse address %s" % (rec.dns_name, rev.rdata.ptrdname))