Commit 8f99162b authored by Shane Hathaway's avatar Shane Hathaway

Fixed rendering of exceptions that have no args attribute

parent dbf824f4
...@@ -50,10 +50,13 @@ def ustr(v): ...@@ -50,10 +50,13 @@ def ustr(v):
return str(v) return str(v)
def _exception_str(self): def _exception_str(exc):
if not self.args: if hasattr(exc, 'args'):
return '' if not exc.args:
elif len(self.args) == 1: return ''
return ustr(self.args[0]) elif len(exc.args) == 1:
else: return ustr(exc.args[0])
return str(self.args) else:
return str(exc.args)
return str(exc)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment