diff options
author | Bob Halley <halley@dnspython.org> | 2020-08-19 05:30:30 -0700 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2020-08-19 05:30:30 -0700 |
commit | bee23ec15fdde8f0303b0a3699669599c5abf8cb (patch) | |
tree | 4163adbd42903cff6db95083712b0874c251879e /dns/rdtypes/ANY/RP.py | |
parent | 04d65197c72930fbc2857e7384418d6f045f7aa0 (diff) | |
download | dnspython-bee23ec15fdde8f0303b0a3699669599c5abf8cb.tar.gz |
make name and rdata use the immutable decoratormore-immut
Diffstat (limited to 'dns/rdtypes/ANY/RP.py')
-rw-r--r-- | dns/rdtypes/ANY/RP.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dns/rdtypes/ANY/RP.py b/dns/rdtypes/ANY/RP.py index a6054da..d872727 100644 --- a/dns/rdtypes/ANY/RP.py +++ b/dns/rdtypes/ANY/RP.py @@ -16,10 +16,12 @@ # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. import dns.exception +import dns.immutable import dns.rdata import dns.name +@dns.immutable.immutable class RP(dns.rdata.Rdata): """RP record""" @@ -30,8 +32,8 @@ class RP(dns.rdata.Rdata): def __init__(self, rdclass, rdtype, mbox, txt): super().__init__(rdclass, rdtype) - object.__setattr__(self, 'mbox', mbox) - object.__setattr__(self, 'txt', txt) + self.mbox = self.as_value(mbox) + self.txt = self.as_value(txt) def to_text(self, origin=None, relativize=True, **kw): mbox = self.mbox.choose_relativity(origin, relativize) |