-# 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,
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."""
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