]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
replace() can now rely on constructors to validate
authorBob Halley <halley@dnspython.org>
Thu, 27 Aug 2020 15:26:19 +0000 (08:26 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 27 Aug 2020 15:26:19 +0000 (08:26 -0700)
dns/rdata.py

index 60a0d49e5ac2a2606453771e0b2db0d63371120a..c2c36afd979547fcf9b6a49d4625ce10be975d34 100644 (file)
@@ -324,11 +324,7 @@ class Rdata:
         args = (kwargs.get(key, getattr(self, key)) for key in parameters)
 
         # Create, validate, and return the new object.
-        #
-        # Note that if we make constructors do validation in the future,
-        # this validation can go away.
         rd = self.__class__(*args)
-        dns.rdata.from_text(rd.rdclass, rd.rdtype, rd.to_text())
         # The comment is not set in the constructor, so give it special
         # handling.
         rdcomment = kwargs.get('rdcomment', self.rdcomment)