]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Do not reference docstrings in exception formatting as they may be stripped.
authorBob Halley <halley@dnspython.org>
Thu, 12 May 2016 13:20:01 +0000 (06:20 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 12 May 2016 13:20:01 +0000 (06:20 -0700)
[issue #154]

dns/exception.py
dns/resolver.py

index 81c8daabebd8d2743fc992d4f8b0b66b01460904..799d53ad59187ebfb3dcac7a4ab4d5990eba97b1 100644 (file)
@@ -121,4 +121,4 @@ class Timeout(DNSException):
 
     """The DNS operation timed out."""
     supp_kwargs = set(['timeout'])
-    fmt = "%s after {timeout} seconds" % __doc__[:-1]
+    fmt = "The DNS operation timed out after {timeout} seconds"
index e00a7ca4515a8b2983b8ac2867a411c1f158b039..924144400484ad02896a923c57767e97e9c97a8f 100644 (file)
@@ -80,7 +80,8 @@ Timeout = dns.exception.Timeout
 class NoAnswer(dns.exception.DNSException):
 
     """The DNS response does not contain an answer to the question."""
-    fmt = '%s: {query}' % __doc__[:-1]
+    fmt = 'The DNS response does not contain an answer ' + \
+          'to the question: {query}'
     supp_kwargs = set(['response'])
 
     def _fmt_kwargs(self, **kwargs):