mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#155: Fix Python 2.4 compatibility: exceptions are old-style classes there.
This commit is contained in:
parent
64d2c2c795
commit
b1dbe95255
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
|||||||
Release 0.6.2 (in development)
|
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
|
* #150: Fix display of the "sphinxdoc" theme on Internet Explorer
|
||||||
versions 6 and 7.
|
versions 6 and 7.
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class ExtensionError(SphinxError):
|
|||||||
category = 'Extension error'
|
category = 'Extension error'
|
||||||
|
|
||||||
def __init__(self, message, orig_exc=None):
|
def __init__(self, message, orig_exc=None):
|
||||||
super(ExtensionError, self).__init__(message)
|
SphinxError.__init__(self, message)
|
||||||
self.orig_exc = orig_exc
|
self.orig_exc = orig_exc
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
@ -38,7 +38,7 @@ class ExtensionError(SphinxError):
|
|||||||
return '%s(%r)' % (self.__class__.__name__, self.message)
|
return '%s(%r)' % (self.__class__.__name__, self.message)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
parent_str = super(ExtensionError, self).__str__()
|
parent_str = SphinxError.__str__(self)
|
||||||
if self.orig_exc:
|
if self.orig_exc:
|
||||||
return '%s (exception: %s)' % (parent_str, self.orig_exc)
|
return '%s (exception: %s)' % (parent_str, self.orig_exc)
|
||||||
return parent_str
|
return parent_str
|
||||||
|
Loading…
Reference in New Issue
Block a user