From: Bob Halley Date: Fri, 17 Dec 2010 21:44:28 +0000 (-0800) Subject: use is and not == when comparing sections X-Git-Tag: v1.9.3~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6159adbca6e8d42c0a092f6eb73a1b8eadd86973;p=thirdparty%2Fdnspython.git use is and not == when comparing sections --- diff --git a/ChangeLog b/ChangeLog index 6a07424d..0fff77f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-12-17 Bob Halley + + * dns/message.py (_WireReader._get_section): use "is" and not "==" + when testing what section an RR is in. Thanks to James Raftery + for reporting this bug. + 2010-12-10 Bob Halley * dns/resolver.py (Resolver.query): disallow metaqueries. diff --git a/dns/message.py b/dns/message.py index 5ec711e1..a124a3e1 100644 --- a/dns/message.py +++ b/dns/message.py @@ -686,7 +686,7 @@ class _WireReader(object): deleting = None if deleting == dns.rdataclass.ANY or \ (deleting == dns.rdataclass.NONE and \ - section == self.message.answer): + section is self.message.answer): covers = dns.rdatatype.NONE rd = None else: