Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-09-08 20:20:15 +0300
committerJon Dufresne <jon.dufresne@gmail.com>2018-09-09 21:50:56 +0300
commit9d6deec4ca2f95460ef62b54b7b42f589ef3351e (patch)
treec867faa3a43e6241f11ca8533096244ddd337d1b /sphinx/errors.py
parentcf707ac46f0cdfdd437b60744b7dc54362e4c656 (diff)
Fix AttributeError in ExtensionError
In Python 3, the attribute BaseException.message doesn't exist. $ python3 >>> from sphinx.errors import ExtensionError >>> e = ExtensionError('foo') >>> repr(e) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "sphinx/sphinx/errors.py", line 65, in __repr__ return '%s(%r)' % (self.__class__.__name__, self.message) AttributeError: 'ExtensionError' object has no attribute 'message'
Diffstat (limited to 'sphinx/errors.py')
-rw-r--r--sphinx/errors.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sphinx/errors.py b/sphinx/errors.py
index e97447e86..005605f1c 100644
--- a/sphinx/errors.py
+++ b/sphinx/errors.py
@@ -55,6 +55,7 @@ class ExtensionError(SphinxError):
def __init__(self, message, orig_exc=None):
# type: (unicode, Exception) -> None
SphinxError.__init__(self, message)
+ self.message = message
self.orig_exc = orig_exc
def __repr__(self):