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 ()
| 204 | |
| 205 | |
| 206 | class 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 | |
| 231 | class NotAbsolute(dns.exception.DNSException): |
no outgoing calls
no test coverage detected
searching dependent graphs…