diff options
| author | Craig Leres <leres@xse.com> | 2022-01-30 10:40:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-30 10:40:54 -0800 |
| commit | 1f636810325144cd6aaeae8f673de230615ff186 (patch) | |
| tree | 8cddfa1d3b1bd2828d0dad4f320513fa55763a40 /dns | |
| parent | 78144a6717a16f725eb0299eeb29188df0797f74 (diff) | |
| download | dnspython-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.py | 2 | ||||
| -rw-r--r-- | dns/resolver.py | 2 |
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): |
