]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
use is and not == when comparing sections
authorBob Halley <halley@nominum.com>
Fri, 17 Dec 2010 21:44:28 +0000 (13:44 -0800)
committerBob Halley <halley@nominum.com>
Fri, 17 Dec 2010 21:44:28 +0000 (13:44 -0800)
ChangeLog
dns/message.py

index 6a07424d40e2593b9dd87b66266f99bc05a32b2c..0fff77f9777a8fffda34780dae862fd98397f5eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-17  Bob Halley  <halley@dnspython.org>
+
+       * 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  <halley@dnspython.org>
 
        * dns/resolver.py (Resolver.query): disallow metaqueries.
index 5ec711e1ebb68d17ceefbb02835c32b7684cec3a..a124a3e1779094e08f762388571737da810a642b 100644 (file)
@@ -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: