From: Bob Halley Date: Mon, 26 Sep 2016 15:51:25 +0000 (-0700) Subject: When raising NoAnswer from a cache hit, supply the response. X-Git-Tag: v1.15.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f421bd61ce7ae106cf534fdc9c61b9bcec267b0a;p=thirdparty%2Fdnspython.git When raising NoAnswer from a cache hit, supply the response. [Issue #206] --- diff --git a/dns/resolver.py b/dns/resolver.py index f6ab64f6..aaf93fe2 100644 --- a/dns/resolver.py +++ b/dns/resolver.py @@ -922,7 +922,7 @@ class Resolver(object): answer = self.cache.get((_qname, rdtype, rdclass)) if answer is not None: if answer.rrset is None and raise_on_no_answer: - raise NoAnswer + raise NoAnswer(response=answer.response) else: return answer request = dns.message.make_query(_qname, rdtype, rdclass)