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

Method get_name

dns/tokenizer.py:661–675  ·  view source on GitHub ↗

Read the next token and interpret it as a DNS name. Raises dns.exception.SyntaxError if not a name. Returns a dns.name.Name.

(
        self,
        origin: dns.name.Name | None = None,
        relativize: bool = False,
        relativize_to: dns.name.Name | None = None,
    )

Source from the content-addressed store, hash-verified

659 return name.choose_relativity(relativize_to or origin, relativize)
660
661 def get_name(
662 self,
663 origin: dns.name.Name | None = None,
664 relativize: bool = False,
665 relativize_to: dns.name.Name | None = None,
666 ) -> dns.name.Name:
667 """Read the next token and interpret it as a DNS name.
668
669 Raises dns.exception.SyntaxError if not a name.
670
671 Returns a dns.name.Name.
672 """
673
674 token = self.get()
675 return self.as_name(token, origin, relativize, relativize_to)
676
677 def get_eol_as_token(self) -> Token:
678 """Read the next token and raise an exception if it isn't EOL or

Callers

nothing calls this directly

Calls 2

getMethod · 0.95
as_nameMethod · 0.95

Tested by

no test coverage detected