#155: Fix Python 2.4 compatibility: exceptions are old-style classes there.

This commit is contained in:
Georg Brandl
2009-05-10 21:14:14 +02:00
parent 64d2c2c795
commit b1dbe95255
2 changed files with 5 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ class ExtensionError(SphinxError):
category = 'Extension error'
def __init__(self, message, orig_exc=None):
super(ExtensionError, self).__init__(message)
SphinxError.__init__(self, message)
self.orig_exc = orig_exc
def __repr__(self):
@@ -38,7 +38,7 @@ class ExtensionError(SphinxError):
return '%s(%r)' % (self.__class__.__name__, self.message)
def __str__(self):
parent_str = super(ExtensionError, self).__str__()
parent_str = SphinxError.__str__(self)
if self.orig_exc:
return '%s (exception: %s)' % (parent_str, self.orig_exc)
return parent_str