summaryrefslogtreecommitdiff
path: root/dns/rdtypes/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'dns/rdtypes/util.py')
-rw-r--r--dns/rdtypes/util.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/dns/rdtypes/util.py b/dns/rdtypes/util.py
index a63d1a0..3a089ed 100644
--- a/dns/rdtypes/util.py
+++ b/dns/rdtypes/util.py
@@ -113,11 +113,8 @@ class Bitmap:
def from_text(self, tok):
rdtypes = []
- while True:
- token = tok.get().unescape()
- if token.is_eol_or_eof():
- break
- rdtype = dns.rdatatype.from_text(token.value)
+ for token in tok.get_remaining():
+ rdtype = dns.rdatatype.from_text(token.unescape().value)
if rdtype == 0:
raise dns.exception.SyntaxError(f"{self.type_name} with bit 0")
rdtypes.append(rdtype)