summaryrefslogtreecommitdiff
path: root/dns/tokenizer.py
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2015-02-24 19:49:23 +0100
committerThomas Waldmann <tw@waldmann-edv.de>2015-02-24 19:49:23 +0100
commit0f0850f738425fda85b21e04cb72f7ca6f2923c0 (patch)
tree421a8965a1fc534fb9b2563655b5cc8d009f20ad /dns/tokenizer.py
parent43c14fd73b3b94211ff8bfad8f894b48cce4e577 (diff)
downloaddnspython-0f0850f738425fda85b21e04cb72f7ca6f2923c0.tar.gz
fix unicode ipaddr crashes in rdata.from_text and tokenizer.Tokenizer, fixes #41
also added unit tests for both issues.
Diffstat (limited to 'dns/tokenizer.py')
-rw-r--r--dns/tokenizer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/dns/tokenizer.py b/dns/tokenizer.py
index ab56873..6a48975 100644
--- a/dns/tokenizer.py
+++ b/dns/tokenizer.py
@@ -197,7 +197,7 @@ class Tokenizer(object):
@type filename: string
"""
- if isinstance(f, str):
+ if isinstance(f, (str, unicode)):
f = cStringIO.StringIO(f)
if filename is None:
filename = '<string>'