]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Message get_rrset() needs to pass idna_codec to find_rrset().
authorBob Halley <halley@dnspython.org>
Thu, 6 Apr 2023 13:06:24 +0000 (06:06 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 6 Apr 2023 13:06:24 +0000 (06:06 -0700)
Also removes some lint about "section = section" being a no-op.

dns/message.py

index 2ccdc2b19b14bbceeef47092b04dea0ac90ac47a..13600e41b7f3d724bea2c538348a3be329bf4b6c 100644 (file)
@@ -398,7 +398,6 @@ class Message:
             section = self.section_from_number(section_number)
         else:
             section_number = self.section_number(section)
-            section = section
         if isinstance(name, str):
             name = dns.name.from_text(name, idna_codec=idna_codec)
         rdtype = dns.rdatatype.RdataType.make(rdtype)
@@ -477,7 +476,15 @@ class Message:
 
         try:
             rrset = self.find_rrset(
-                section, name, rdclass, rdtype, covers, deleting, create, force_unique
+                section,
+                name,
+                rdclass,
+                rdtype,
+                covers,
+                deleting,
+                create,
+                force_unique,
+                idna_codec,
             )
         except KeyError:
             rrset = None