And that value is only filled in if there is an exception in Sultan.run(); if the user unaware of that calls Result.print_traceback(), there's a general exception
TypeError: 'NoneType' object is not iterable
, coming from Result.__format_lines()'s iterator over the Result.traceback.
If the default is changed to an empty string, the exception won't occur and print_traceback() will behave like the other two print methods.
Currently the default value of
traceback
isNone
:def __init__(self, stdout, stderr, traceback=None, rc=None):
And that value is only filled in if there is an exception in
Sultan.run()
; if the user unaware of that callsResult.print_traceback()
, there's a general exception, coming from
Result.__format_lines()
's iterator over theResult.traceback
.If the default is changed to an empty string, the exception won't occur and
print_traceback()
will behave like the other two print methods.