From: Nick Hall Date: Sun, 28 Jun 2020 23:56:19 +0000 (+0100) Subject: minor (cosmetic) fix to update sections X-Git-Tag: v2.0.0rc2~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17ee28de25b24660887a5521567715a89e735697;p=thirdparty%2Fdnspython.git minor (cosmetic) fix to update sections --- diff --git a/dns/update.py b/dns/update.py index 2d4965d5..130577d1 100644 --- a/dns/update.py +++ b/dns/update.py @@ -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)