diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-01-08 01:38:45 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-01-08 01:38:45 +0900 |
commit | 4153ee0d9d33074b09c7ee8b241dc1d61eb3f32f (patch) | |
tree | 11aa1a35e24ef1b5fec5851a5798efa7eb54f716 /sphinx/util/parallel.py | |
parent | f1d2a7ffaa1689e3e20c846b88969c2aadd284be (diff) | |
download | sphinx-git-4153ee0d9d33074b09c7ee8b241dc1d61eb3f32f.tar.gz |
Fix Sphinx crashes on parallel build with an extension which raises unserializable exception
Diffstat (limited to 'sphinx/util/parallel.py')
-rw-r--r-- | sphinx/util/parallel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py index bace0b5fd..4f4cd5c46 100644 --- a/sphinx/util/parallel.py +++ b/sphinx/util/parallel.py @@ -73,7 +73,8 @@ class ParallelTasks(object): ret = func(arg) pipe.send((False, ret)) except BaseException as err: - pipe.send((True, (err, traceback.format_exc()))) + errmsg = traceback.format_exception_only(err.__class__, err)[0].strip() + pipe.send((True, (errmsg, traceback.format_exc()))) def add_task(self, task_func, arg=None, result_func=None): tid = self._taskid |