summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dns/exception.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/dns/exception.py b/dns/exception.py
index db6ef6e..575cebe 100644
--- a/dns/exception.py
+++ b/dns/exception.py
@@ -17,7 +17,12 @@
class DNSException(Exception):
"""Abstract base class shared by all dnspython exceptions."""
- pass
+ def __init__(self, *args):
+ if args:
+ super(DNSException, self).__init__(*args)
+ else:
+ # doc string is better implicit message than empty string
+ super(DNSException, self).__init__(self.__doc__)
class FormError(DNSException):
"""DNS message is malformed."""