MCPcopy Create free account
hub / github.com/rthalley/dnspython / canonical_name

Method canonical_name

dns/message.py:1075–1089  ·  view source on GitHub ↗

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.ChainTooLong`` if the CNAME chain is too long. Raises ``dns.message.AnswerForNXDOMAIN`` if th

(self)

Source from the content-addressed store, hash-verified

1073 return ChainingResult(qname, answer, min_ttl, cnames)
1074
1075 def canonical_name(self) -> dns.name.Name:
1076 """Return the canonical name of the first name in the question
1077 section.
1078
1079 Raises ``dns.message.NotQueryResponse`` if the message is not
1080 a response.
1081
1082 Raises ``dns.message.ChainTooLong`` if the CNAME chain is too long.
1083
1084 Raises ``dns.message.AnswerForNXDOMAIN`` if the rcode is NXDOMAIN
1085 but an answer was found.
1086
1087 Raises ``dns.exception.FormError`` if the question count is not 1.
1088 """
1089 return self.resolve_chaining().canonical_name
1090
1091
1092def _maybe_import_update():

Callers

nothing calls this directly

Calls 1

resolve_chainingMethod · 0.95

Tested by

no test coverage detected