summaryrefslogtreecommitdiff
path: root/dns/exception.py
diff options
context:
space:
mode:
authorBrian Wellington <bwelling@xbill.org>2020-06-03 15:56:58 -0700
committerBrian Wellington <bwelling@xbill.org>2020-06-03 15:56:58 -0700
commitcc55d17f5478751da21a7b325b2b46e8d94d8ffb (patch)
treecfe1f182855d91fef11be31e4f4b77eeb214790d /dns/exception.py
parent8643c7d660fcc3bf620b085c2e483d1419408f96 (diff)
downloaddnspython-cc55d17f5478751da21a7b325b2b46e8d94d8ffb.tar.gz
Minor Python 3 cleanups.
Classes inherit from object by default; there's no need to explicitly include this. Replace super(Foo, self) with super().
Diffstat (limited to 'dns/exception.py')
-rw-r--r--dns/exception.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dns/exception.py b/dns/exception.py
index 71ff04f..8f1d488 100644
--- a/dns/exception.py
+++ b/dns/exception.py
@@ -59,9 +59,9 @@ class DNSException(Exception):
# doc string is better implicit message than empty string
self.msg = self.__doc__
if args:
- super(DNSException, self).__init__(*args)
+ super().__init__(*args)
else:
- super(DNSException, self).__init__(self.msg)
+ super().__init__(self.msg)
def _check_params(self, *args, **kwargs):
"""Old exceptions supported only args and not kwargs.
@@ -103,7 +103,7 @@ class DNSException(Exception):
return self.fmt.format(**fmtargs)
else:
# print *args directly in the same way as old DNSException
- return super(DNSException, self).__str__()
+ return super().__str__()
class FormError(DNSException):