diff options
Diffstat (limited to 'lib/dnspython/dns/name.py')
-rw-r--r-- | lib/dnspython/dns/name.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/dnspython/dns/name.py b/lib/dnspython/dns/name.py index f239c9b5de..ed3ffeec57 100644 --- a/lib/dnspython/dns/name.py +++ b/lib/dnspython/dns/name.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. +# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, @@ -29,6 +29,7 @@ if sys.hexversion >= 0x02030000: import encodings.idna import dns.exception +import dns.wiredata NAMERELN_NONE = 0 NAMERELN_SUPERDOMAIN = 1 @@ -670,6 +671,7 @@ def from_wire(message, current): if not isinstance(message, str): raise ValueError("input to from_wire() must be a byte string") + message = dns.wiredata.maybe_wrap(message) labels = [] biggest_pointer = current hops = 0 @@ -678,7 +680,7 @@ def from_wire(message, current): cused = 1 while count != 0: if count < 64: - labels.append(message[current : current + count]) + labels.append(message[current : current + count].unwrap()) current += count if hops == 0: cused += count |