Merge pull request #6553 from tk0miya/6549_escaped_errmsg

Fix #6549: sphinx-build: Escaped characters in error messages
This commit is contained in:
Takeshi KOMIYA 2019-07-07 18:46:54 +09:00 committed by GitHub
commit ef2f1057cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -53,6 +53,7 @@ Bugs fixed
* #6527: :confval:`last_updated` wrongly assumes timezone as UTC
* #5592: std domain: :rst:dir:`option` directive registers an index entry for
each comma separated option
* #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)