traceback.format_exception()
takes three arguments.
sys.exc_info()
returns a tuple of three elements that are the required arguments for traceback.format_exception()
Is there any way of avoiding the two line "conversion":
a,b,c = sys.exc_info()
error_info = traceback.format_exception(a,b,c)
Clearly
error_info = traceback.format_exception(sys.exc_info())
doesn't work, because format_exception()
takes three arguments, not one tuple (facepalm!)
Is there some tidy way of doing this in one statement?