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'):
if not exc.args:
return '' return ''
elif len(self.args) == 1: elif len(exc.args) == 1:
return ustr(self.args[0]) return ustr(exc.args[0])
else: else:
return str(self.args) 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