diff options
author | Brian Wellington <bwelling@xbill.org> | 2023-03-28 10:53:18 -0700 |
---|---|---|
committer | Brian Wellington <bwelling@xbill.org> | 2023-03-28 10:53:18 -0700 |
commit | 842f0bbd85e39dae7eb396c788ad0ff77a1cf493 (patch) | |
tree | 1f8dd8a160880ec9dbb4f3eb0be49eccdcd50822 | |
parent | bde3e703e6aaf3b21fdb10946d0e5cd86042eff6 (diff) | |
download | dnspython-842f0bbd85e39dae7eb396c788ad0ff77a1cf493.tar.gz |
Clean up the NoDOH exception.
The docstring/default should refer to httpx, not requests, and the
callers should use it rather than providing alternate (and different)
strings.
-rw-r--r-- | dns/asyncquery.py | 2 | ||||
-rw-r--r-- | dns/query.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dns/asyncquery.py b/dns/asyncquery.py index a2bd06e..97afa0b 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -512,7 +512,7 @@ async def https( """ if not have_doh: - raise NoDOH("httpx is not available.") # pragma: no cover + raise NoDOH # pragma: no cover if client and not isinstance(client, httpx.AsyncClient): raise ValueError("session parameter must be an httpx.AsyncClient") diff --git a/dns/query.py b/dns/query.py index 7ba3add..c4bd75e 100644 --- a/dns/query.py +++ b/dns/query.py @@ -192,7 +192,7 @@ class BadResponse(dns.exception.FormError): class NoDOH(dns.exception.DNSException): - """DNS over HTTPS (DOH) was requested but the requests module is not + """DNS over HTTPS (DOH) was requested but the httpx module is not available.""" @@ -430,7 +430,7 @@ def https( """ if not have_doh: - raise NoDOH("DNS-over-HTTPS is not available.") # pragma: no cover + raise NoDOH # pragma: no cover if session and not isinstance(session, httpx.Client): raise ValueError("session parameter must be an httpx.Client") |