summaryrefslogtreecommitdiff
path: root/lib/dnspython/dns/name.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-08-27 16:07:52 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-08-27 17:40:39 +0200
commit8bd71350abe48fdcfc0125e48fa97abdf31e1270 (patch)
tree2873d7fc77f9ec1992e24886a9feae80b48ffaef /lib/dnspython/dns/name.py
parentbd01a8e79faa3d657f01529c063cd0e09d711880 (diff)
downloadsamba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.tar.gz
samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.tar.bz2
samba-8bd71350abe48fdcfc0125e48fa97abdf31e1270.zip
dnspython: Update to latest upstream snapshot.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Aug 27 17:40:39 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/dnspython/dns/name.py')
-rw-r--r--lib/dnspython/dns/name.py6
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