From 75ef8f1dd27f4985b3d705e7681a9218ad513c84 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 9 Dec 2010 14:53:45 +0100 Subject: dnspython: Update to newer upstream snapshot. --- lib/dnspython/dns/message.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/dnspython/dns/message.py') diff --git a/lib/dnspython/dns/message.py b/lib/dnspython/dns/message.py index ba0ebf65f1..5ec711e1eb 100644 --- a/lib/dnspython/dns/message.py +++ b/lib/dnspython/dns/message.py @@ -21,6 +21,7 @@ import struct import sys import time +import dns.edns import dns.exception import dns.flags import dns.name @@ -92,8 +93,11 @@ class Message(object): @type keyring: dict @ivar keyname: The TSIG keyname to use. The default is None. @type keyname: dns.name.Name object - @ivar keyalgorithm: The TSIG key algorithm to use. The default is - dns.tsig.default_algorithm. + @ivar keyalgorithm: The TSIG algorithm to use; defaults to + dns.tsig.default_algorithm. Constants for TSIG algorithms are defined + in dns.tsig, and the currently implemented algorithms are + HMAC_MD5, HMAC_SHA1, HMAC_SHA224, HMAC_SHA256, HMAC_SHA384, and + HMAC_SHA512. @type keyalgorithm: string @ivar request_mac: The TSIG MAC of the request message associated with this message; used when validating TSIG signatures. @see: RFC 2845 for @@ -1035,9 +1039,9 @@ def make_query(qname, rdtype, rdclass = dns.rdataclass.IN, use_edns=None, if isinstance(qname, (str, unicode)): qname = dns.name.from_text(qname) - if isinstance(rdtype, str): + if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) - if isinstance(rdclass, str): + if isinstance(rdclass, (str, unicode)): rdclass = dns.rdataclass.from_text(rdclass) m = Message() m.flags |= dns.flags.RD -- cgit