diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-05-03 18:15:20 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-05-03 18:15:20 +0300 |
commit | 75203967d802c1660c45362b5a80b76a4daabd8a (patch) | |
tree | 73b6851adca5aace408cd7e641aea3bc2b601cca /sphinx/util/logging.py | |
parent | e7e9b4cbd0189967809810b7218c7b6d78af4a86 (diff) | |
parent | 787fda8e49616720e21208ed59297b41712e0c62 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/util/logging.py')
-rw-r--r-- | sphinx/util/logging.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index 5526d7538..5206363a5 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -411,9 +411,13 @@ class WarningIsErrorFilter(logging.Filter): message = record.msg # use record.msg itself if location: - raise SphinxWarning(location + ":" + str(message)) + exc = SphinxWarning(location + ":" + str(message)) else: - raise SphinxWarning(message) + exc = SphinxWarning(message) + if record.exc_info is not None: + raise exc from record.exc_info[1] + else: + raise exc else: return True |