summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@nominum.com>2010-01-12 15:24:46 -0800
committerBob Halley <halley@nominum.com>2010-01-12 15:24:46 -0800
commit0cf68ff2679bf078d6cf12b12c64c0ded3f832a1 (patch)
tree70a9c1e812d79f649ec5df8ae5c36d53c8df28dd
parentf767791da2fefdfcd3e05fcff06e64925850f428 (diff)
downloaddnspython-0cf68ff2679bf078d6cf12b12c64c0ded3f832a1.tar.gz
fix problems parsing generic rdata after tokenizer changes
-rw-r--r--dns/rdata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dns/rdata.py b/dns/rdata.py
index 3d1fd99..7e8d606 100644
--- a/dns/rdata.py
+++ b/dns/rdata.py
@@ -319,7 +319,8 @@ class GenericRdata(Rdata):
return r'\# %d ' % len(self.data) + _hexify(self.data)
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
- if tok.get_string() != r'\#':
+ token = tok.get()
+ if not token.is_identifier() or token.value != '\#'
raise dns.exception.SyntaxError, \
r'generic rdata does not start with \#'
length = tok.get_int()
@@ -415,7 +416,7 @@ def from_text(rdclass, rdtype, tok, origin = None, relativize = True):
# peek at first token
token = tok.get()
tok.unget(token)
- if token.is_identifier and \
+ if token.is_identifier() and \
token.value == r'\#':
#
# Known type using the generic syntax. Extract the