Skip to content

Commit

Permalink
Fix for exceptions handling in HtmlOutput’s formatErr method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mitya57 committed Mar 3, 2016
1 parent 5966013 commit 06958b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def finalize(self, result):

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):
Expand Down

0 comments on commit 06958b1

Please sign in to comment.