]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
minor (cosmetic) fix to update sections 522/head
authorNick Hall <nick.hall@deshaw.com>
Sun, 28 Jun 2020 23:56:19 +0000 (00:56 +0100)
committerNick Hall <nick.hall@deshaw.com>
Mon, 29 Jun 2020 22:33:30 +0000 (23:33 +0100)
dns/update.py

index 2d4965d5621af43be04e17e2b22eeb3dfd3f5976..130577d12c785adbd4c4102c40d12d6d7cc4c716 100644 (file)
@@ -306,14 +306,14 @@ class UpdateMessage(dns.message.Message):
         if section == UpdateSection.ZONE:
             if dns.rdataclass.is_metaclass(rdclass) or \
                rdtype != dns.rdatatype.SOA or \
-               self.question:
+               self.zone:
                 raise dns.exception.FormError
         else:
-            if not self.question:
+            if not self.zone:
                 raise dns.exception.FormError
             if rdclass in (dns.rdataclass.ANY, dns.rdataclass.NONE):
                 deleting = rdclass
-                rdclass = self.question[0].rdclass
+                rdclass = self.zone[0].rdclass
                 empty = (deleting == dns.rdataclass.ANY or
                          section == UpdateSection.PREREQ)
         return (rdclass, rdtype, deleting, empty)