diff options
| author | Thomas Waldmann <tw@waldmann-edv.de> | 2015-02-24 19:49:23 +0100 |
|---|---|---|
| committer | Thomas Waldmann <tw@waldmann-edv.de> | 2015-02-24 19:49:23 +0100 |
| commit | 0f0850f738425fda85b21e04cb72f7ca6f2923c0 (patch) | |
| tree | 421a8965a1fc534fb9b2563655b5cc8d009f20ad /dns/rdata.py | |
| parent | 43c14fd73b3b94211ff8bfad8f894b48cce4e577 (diff) | |
| download | dnspython-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/rdata.py')
| -rw-r--r-- | dns/rdata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dns/rdata.py b/dns/rdata.py index 3a31ae1..ef0ddde 100644 --- a/dns/rdata.py +++ b/dns/rdata.py @@ -412,7 +412,7 @@ def from_text(rdclass, rdtype, tok, origin = None, relativize = True): @type relativize: bool @rtype: dns.rdata.Rdata instance""" - if isinstance(tok, str): + if isinstance(tok, (str, unicode)): tok = dns.tokenizer.Tokenizer(tok) cls = get_rdata_class(rdclass, rdtype) if cls != GenericRdata: |
