From 17ee28de25b24660887a5521567715a89e735697 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Mon, 29 Jun 2020 00:56:19 +0100 Subject: [PATCH] minor (cosmetic) fix to update sections --- dns/update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.47.3