From: W.C.A. Wijngaards Date: Tue, 23 Jul 2013 07:55:49 +0000 (+0200) Subject: * bugfix #507: ldnsx Fix use of non-existent variables and not X-Git-Tag: release-1.6.17rc1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b103501102b3eba5680877b1303348646c7389b5;p=thirdparty%2Fldns.git * bugfix #507: ldnsx Fix use of non-existent variables and not properly referring to instance variable. Patch from shussain. --- diff --git a/Changelog b/Changelog index efe7b9c7..15cdbed1 100644 --- a/Changelog +++ b/Changelog @@ -24,6 +24,8 @@ zone to be an NSEC3 (or its RRSIG) covering an empty non terminal. * New functions: ldns_pkt_ixfr_request_new and ldns_pkt_ixfr_request_new_frm_str. + * bugfix #507: ldnsx Fix use of non-existent variables and not + properly referring to instance variable. Patch from shussain. 1.6.16 2012-11-13 * Fix Makefile to build pyldns with BSD make diff --git a/contrib/ldnsx/ldnsx.py b/contrib/ldnsx/ldnsx.py index ee81b2fd..b61a9e72 100644 --- a/contrib/ldnsx/ldnsx.py +++ b/contrib/ldnsx/ldnsx.py @@ -132,9 +132,9 @@ def secure_query(name, rr_type, rr_class="IN", flags=["RD"], tries = 1, flex=Fal raise Exception("%s lookup failed (server error or dnssec validation failed)" % name) if pkt.rcode() == "NXDOMAIN": if "AD" in pkt.flags(): - raise Exception("%s lookup failed (non-existence proven by DNSSEC)" % hostname ) + raise Exception("%s lookup failed (non-existence proven by DNSSEC)" % name ) else: - raise Exception("%s lookup failed" % hostname ) + raise Exception("%s lookup failed" % name ) if pkt.rcode() == "NOERROR": if "AD" not in pkt.flags(): if not flex: @@ -698,7 +698,7 @@ class resource_record: def __len__(self): try: - return len(_rdfs) + return len(self._rdfs) except: return 0