Use super() to call parent class's method

This commit is contained in:
Jon Dufresne
2018-11-11 12:55:22 -08:00
parent 42d52d6a91
commit 710ca3d7c3
19 changed files with 35 additions and 35 deletions

View File

@@ -54,7 +54,7 @@ class ExtensionError(SphinxError):
def __init__(self, message, orig_exc=None):
# type: (unicode, Exception) -> None
SphinxError.__init__(self, message)
super(ExtensionError, self).__init__(message)
self.message = message
self.orig_exc = orig_exc
@@ -67,7 +67,7 @@ class ExtensionError(SphinxError):
def __str__(self):
# type: () -> str
parent_str = SphinxError.__str__(self)
parent_str = super(ExtensionError, self).__str__()
if self.orig_exc:
return '%s (exception: %s)' % (parent_str, self.orig_exc)
return parent_str