Fix #6549: sphinx-build: Escaped characters in error messages

This commit is contained in:
Takeshi KOMIYA 2019-07-06 14:28:36 +09:00
parent 8b4e54f904
commit 3fa3ff439c
2 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@ Bugs fixed
* #6511: LaTeX: autonumbered list can not be customized in LaTeX
since Sphinx 1.8.0 (refs: #6533)
* #6531: Failed to load last environment object when extension added
* #6549: sphinx-build: Escaped characters in error messages
Testing
--------

View File

@ -47,7 +47,7 @@ def handle_exception(app: Sphinx, args: Any, exception: BaseException, stderr: I
print(terminal_safe(exception.args[0]), file=stderr)
elif isinstance(exception, SphinxError):
print(red('%s:' % exception.category), file=stderr)
print(terminal_safe(str(exception)), file=stderr)
print(str(exception), file=stderr)
elif isinstance(exception, UnicodeError):
print(red(__('Encoding error:')), file=stderr)
print(terminal_safe(str(exception)), file=stderr)