summaryrefslogtreecommitdiff
path: root/dns/rdtypes/ANY/NSEC3PARAM.py
diff options
context:
space:
mode:
authorBrian Wellington <bwelling@xbill.org>2020-03-18 16:44:09 -0700
committerBrian Wellington <bwelling@xbill.org>2020-03-18 16:44:09 -0700
commitcee00834c8ef0c1a0bebbeb98f5e0c97d39ad0d4 (patch)
tree930da1b29884daa1a5d38d63387b49fb41181ced /dns/rdtypes/ANY/NSEC3PARAM.py
parent41ca1be22dad341709a3856f34fe63aa46da1d1b (diff)
downloaddnspython-cee00834c8ef0c1a0bebbeb98f5e0c97d39ad0d4.tar.gz
Add relativize_to to from_text().
When calling from_text, the zone code needs to apply the current origin (which may or may not be the zone origin, if sub-zone $ORIGIN statements are present), and may also want to relativize the contents to the zone origin. Previously, this was done by explicitly reading records as absolute, and then relativizing them laster. With this change, the work is moved to the tokenizer. This gets rid of the remaining internal uses of dns.rdata.choose_relativity(), which prevents rdata from being immutable.
Diffstat (limited to 'dns/rdtypes/ANY/NSEC3PARAM.py')
-rw-r--r--dns/rdtypes/ANY/NSEC3PARAM.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/dns/rdtypes/ANY/NSEC3PARAM.py b/dns/rdtypes/ANY/NSEC3PARAM.py
index 356fff4..8f21657 100644
--- a/dns/rdtypes/ANY/NSEC3PARAM.py
+++ b/dns/rdtypes/ANY/NSEC3PARAM.py
@@ -56,7 +56,8 @@ class NSEC3PARAM(dns.rdata.Rdata):
salt)
@classmethod
- def from_text(cls, rdclass, rdtype, tok, origin=None, relativize=True):
+ def from_text(cls, rdclass, rdtype, tok, origin=None, relativize=True,
+ relativize_to=None):
algorithm = tok.get_uint8()
flags = tok.get_uint8()
iterations = tok.get_uint16()