summaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorCraig Leres <leres@xse.com>2022-01-30 10:40:54 -0800
committerGitHub <noreply@github.com>2022-01-30 10:40:54 -0800
commit1f636810325144cd6aaeae8f673de230615ff186 (patch)
tree8cddfa1d3b1bd2828d0dad4f320513fa55763a40 /dns
parent78144a6717a16f725eb0299eeb29188df0797f74 (diff)
downloaddnspython-1f636810325144cd6aaeae8f673de230615ff186.tar.gz
Reduce the number of digits after the decimal point for the Timeout DNSException from 15 to 1 (#772)
* Reduce the number of digits after the decimal point for the Timeout DNSException from 15 to 1 * Address Bob Halley's concerns: change .1f to .3f and update LifetimeTimeout
Diffstat (limited to 'dns')
-rw-r--r--dns/exception.py2
-rw-r--r--dns/resolver.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/dns/exception.py b/dns/exception.py
index 9392373..0839382 100644
--- a/dns/exception.py
+++ b/dns/exception.py
@@ -125,7 +125,7 @@ class TooBig(DNSException):
class Timeout(DNSException):
"""The DNS operation timed out."""
supp_kwargs = {'timeout'}
- fmt = "The DNS operation timed out after {timeout} seconds"
+ fmt = "The DNS operation timed out after {timeout:.3f} seconds"
class ExceptionWrapper:
diff --git a/dns/resolver.py b/dns/resolver.py
index d391714..5dc2761 100644
--- a/dns/resolver.py
+++ b/dns/resolver.py
@@ -145,7 +145,7 @@ class LifetimeTimeout(dns.exception.Timeout):
"""The resolution lifetime expired."""
msg = "The resolution lifetime expired."
- fmt = "%s after {timeout} seconds: {errors}" % msg[:-1]
+ fmt = "%s after {timeout:.3f} seconds: {errors}" % msg[:-1]
supp_kwargs = {'timeout', 'errors'}
def _fmt_kwargs(self, **kwargs):