aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2016-03-03 17:04:24 +0300
committerDmitry Shachnev <mitya57@gmail.com>2016-03-03 17:04:24 +0300
commit06958b18b3497c8514514f65543223ef2879bf6c (patch)
tree30a26b3460d048d0d58bf34a6b5a287b61176585 /tests
parent596601380fc2911e25394b7675aa34f1cab761a9 (diff)
downloadmarkdown-06958b18b3497c8514514f65543223ef2879bf6c.tar.gz
markdown-06958b18b3497c8514514f65543223ef2879bf6c.tar.bz2
markdown-06958b18b3497c8514514f65543223ef2879bf6c.zip
Fix for exceptions handling in HtmlOutput’s formatErr method
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins.py2
1 files changed, 2 insertions, 0 deletions
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):