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

Class NoNameservers

dns/resolver.py:206–228  ·  view source on GitHub ↗

All nameservers failed to answer the query. errors: list of servers and respective errors The type of errors is [(server IP address, any object convertible to string)]. Non-empty errors list will add explanatory message ()

Source from the content-addressed store, hash-verified

204
205
206class NoNameservers(dns.exception.DNSException):
207 """All nameservers failed to answer the query.
208
209 errors: list of servers and respective errors
210 The type of errors is
211 [(server IP address, any object convertible to string)].
212 Non-empty errors list will add explanatory message ()
213 """
214
215 msg = "All nameservers failed to answer the query."
216 fmt = f"{msg[:-1]} {{query}}: {{errors}}"
217 supp_kwargs = {"request", "errors"}
218
219 # We do this as otherwise mypy complains about unexpected keyword argument
220 # idna_exception
221 def __init__(self, *args, **kwargs):
222 super().__init__(*args, **kwargs)
223
224 def _fmt_kwargs(self, **kwargs):
225 srv_msgs = _errors_to_text(kwargs["errors"])
226 return super()._fmt_kwargs(
227 query=kwargs["request"].question, errors="; ".join(srv_msgs)
228 )
229
230
231class NotAbsolute(dns.exception.DNSException):

Callers 1

next_nameserverMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…