From b1dbe952552cd265c4e554f0068a47a1afca8b69 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 10 May 2009 21:14:14 +0200 Subject: [PATCH] #155: Fix Python 2.4 compatibility: exceptions are old-style classes there. --- CHANGES | 3 +++ sphinx/errors.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 392ea6b7c..7c92731a4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Release 0.6.2 (in development) ============================== +* #155: Fix Python 2.4 compatibility: exceptions are old-style + classes there. + * #150: Fix display of the "sphinxdoc" theme on Internet Explorer versions 6 and 7. diff --git a/sphinx/errors.py b/sphinx/errors.py index d9b8b6b87..f39ee5823 100644 --- a/sphinx/errors.py +++ b/sphinx/errors.py @@ -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