Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nose/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def _prepareErr(self, err):
# Plugins do all sorts of crazy things with exception values.
# Convert it to a custom subclass of Exception with the same
# name as the actual exception to make it print correctly.
value = type(err[0].__name__, (Exception,), {})(err[1])
base_class = Exception
if issubclass(err[0], SyntaxError):
base_class = SyntaxError
value = type(err[0].__name__, (base_class,), {})(err[1])
err = (err[0], value, err[2])
return err

Expand Down