]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
add canonical_name to Answer()
authorBob Halley <halley@nominum.com>
Wed, 23 Mar 2011 01:34:51 +0000 (01:34 +0000)
committerBob Halley <halley@nominum.com>
Wed, 23 Mar 2011 01:34:51 +0000 (01:34 +0000)
ChangeLog
dns/resolver.py

index d13e7a0dbb6551d55c035104089ed097cffbe94e..5bd53b058a72092cebc37dd96dbed8d198774e9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,12 @@
 2011-03-22  Bob Halley  <halley@dnspython.org>
 
        * dns/resolver.py: a boolean parameter, 'raise_on_no_answer', has
-       been added to the query() methods.  In no-error, no-data
-       situations, this parameter determines whether NoAnswer should be
-       raised or not.  If True, NoAnswer is raised.  If False, then an
-       Answer() object with a None rrset will be returned.
+         been added to the query() methods.  In no-error, no-data
+         situations, this parameter determines whether NoAnswer should be
+         raised or not.  If True, NoAnswer is raised.  If False, then an
+         Answer() object with a None rrset will be returned.
+
+       * dns/resolver.py: Answer() objects now have a canonical_name field.
 
 2011-01-11  Bob Halley  <halley@dnspython.org>
 
index ad2223dfcd405109fecd44d68b633b2c851beeaf..e7cdcfd3d85888b1c929a563872317cfe9d45e1f 100644 (file)
@@ -93,6 +93,8 @@ class Answer(object):
     @type rrset: dns.rrset.RRset object
     @ivar expiration: The time when the answer expires
     @type expiration: float (seconds since the epoch)
+    @ivar canonical_name: The canonical name of the query name
+    @type canonical_name: dns.name.Name object
     """
     def __init__(self, qname, rdtype, rdclass, response,
                  raise_on_no_answer=True):
@@ -129,6 +131,7 @@ class Answer(object):
                     raise NoAnswer
         if rrset is None and raise_on_no_answer:
             raise NoAnswer
+        self.canonical_name = qname
         self.rrset = rrset
         if rrset is None:
             while 1: