dnspython: Update to latest upstream snapshot.
[samba.git] / lib / dnspython / dns / message.py
index a124a3e1779094e08f762388571737da810a642b..cf291339347291458ff10b9cd550182020647d5d 100644 (file)
@@ -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,
@@ -34,6 +34,7 @@ import dns.rdatatype
 import dns.rrset
 import dns.renderer
 import dns.tsig
+import dns.wiredata
 
 class ShortHeader(dns.exception.FormError):
     """Raised if the DNS packet passed to from_wire() is too short."""
@@ -577,7 +578,7 @@ class _WireReader(object):
 
     def __init__(self, wire, message, question_only=False,
                  one_rr_per_rrset=False):
-        self.wire = wire
+        self.wire = dns.wiredata.maybe_wrap(wire)
         self.message = message
         self.current = 0
         self.updating = False