From 06958b18b3497c8514514f65543223ef2879bf6c Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Thu, 3 Mar 2016 17:04:24 +0300 Subject: =?UTF-8?q?Fix=20for=20exceptions=20handling=20in=20HtmlOutput?= =?UTF-8?q?=E2=80=99s=20formatErr=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now it should no longer print internal errors instead of intended ones on Python 3. Thanks to Maurice van der Pot for finding this fix. --- tests/plugins.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/plugins.py b/tests/plugins.py index 90c5c0d..4e7af97 100644 --- a/tests/plugins.py +++ b/tests/plugins.py @@ -97,6 +97,8 @@ class HtmlOutput(Plugin): def formatErr(self, err): exctype, value, tb = err + if not isinstance(value, exctype): + value = exctype(value) return ''.join(traceback.format_exception(exctype, value, tb)) def startContext(self, ctx): -- cgit v1.2.3