From: Bob Halley Date: Tue, 21 Jul 2020 18:23:54 +0000 (-0700) Subject: fix exception docstrings X-Git-Tag: v2.1.0rc1~162^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be7dad49220f61f33c4b51daec13ffeef515798c;p=thirdparty%2Fdnspython.git fix exception docstrings --- diff --git a/dns/message.py b/dns/message.py index fd9ddb50..29fca22b 100644 --- a/dns/message.py +++ b/dns/message.py @@ -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]