Revision 3709
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/exc.py | ||
---|---|---|
40 | 40 |
return ''.join(get_traceback_str(t) for t in tracebacks) |
41 | 41 |
|
42 | 42 |
def e_msg(e): |
43 |
assert len(e.args) == 1
|
|
43 |
if len(e.args) == 0: return str(e)
|
|
44 | 44 |
assert util.is_str(e.args[0]) |
45 | 45 |
return strings.ustr(e.args[0]).rstrip() |
46 | 46 |
|
Also available in: Unified diff
exc.py: e_msg(): Fixed bug where exceptions with nothing in e.args (such as StopIteration) caused a failed assertion. Fixed bug where exceptions with multiple values in e.args (such as certain IOErrors) caused a failed assertion.