]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix exception docstrings
authorBob Halley <halley@dnspython.org>
Tue, 21 Jul 2020 18:23:54 +0000 (11:23 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 21 Jul 2020 18:23:54 +0000 (11:23 -0700)
dns/message.py

index fd9ddb505a710cfcd185685c46377ca8d681c71a..29fca22b19e7da3349b250c941626dc89122dd0f 100644 (file)
@@ -716,19 +716,21 @@ class QueryMessage(Message):
         """Follow the CNAME chain in the response to determine the answer
         RRset.
 
-        Raises NotQueryResponse if the message is not a response.
+        Raises ``dns.message.NotQueryResponse`` if the message is not
+        a response.
 
-        Raises dns.message.ChainTooLong if the CNAME chain is too long.
+        Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long.
 
-        Raises AnswerForNXDOMAIN if the rcode is NXDOMAIN but an answer was
-        found.
+        Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN
+        but an answer was found.
 
-        Raises dns.exception.FormError if the question count is not 1.
+        Raises ``dns.exception.FormError`` if the question count is not 1.
 
         Returns a tuple (dns.name.Name, int, rrset) where the name is the
         canonical name, the int is the minimized TTL, and rrset is their
         answer RRset, which may be ``None`` if the chain was dangling or
         the response is an NXDOMAIN.
+
         """
         if self.flags & dns.flags.QR == 0:
             raise NotQueryResponse
@@ -792,14 +794,15 @@ class QueryMessage(Message):
         """Return the canonical name of the first name in the question
         section.
 
-        Raises dns.message.NotQueryResponse if the message is not a response.
+        Raises ``dns.message.NotQueryResponse`` if the message is not
+        a response.
 
-        Raises dns.message.ChainTooLong if the CNAME chain is too long.
+        Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long.
 
-        Raises AnswerForNXDOMAIN if the rcode is NXDOMAIN but an answer was
-        found.
+        Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN
+        but an answer was found.
 
-        Raises dns.exception.FormError if the question count is not 1.
+        Raises ``dns.exception.FormError`` if the question count is not 1.
         """
         return self.resolve_chaining()[0]