From: Bob Halley Date: Thu, 27 Aug 2020 15:26:19 +0000 (-0700) Subject: replace() can now rely on constructors to validate X-Git-Tag: v2.1.0rc1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b944307e60b24b7c068861b3c5cdd2588c2b814b;p=thirdparty%2Fdnspython.git replace() can now rely on constructors to validate --- diff --git a/dns/rdata.py b/dns/rdata.py index 60a0d49e..c2c36afd 100644 --- a/dns/rdata.py +++ b/dns/rdata.py @@ -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)