trying to fix traceback formatting

This commit is contained in:
forest 2021-12-09 13:06:44 -06:00
parent 6d4bba8d3e
commit a88075f2dc

View File

@ -55,4 +55,8 @@ def authorized_as_hub(headers):
return False return False
def my_exec_info_message(exec_info): def my_exec_info_message(exec_info):
return f"{exec_info[0].__module__}.{exec_info[0].__name__}: {exec_info[1]} at line {traceback.format_tb(exec_info[2])}" traceback_result = traceback.format_tb(exec_info[2])
if isinstance(traceback_result, list) {
traceback_result = "\n".join(traceback_result)
}
return f"{exec_info[0].__module__}.{exec_info[0].__name__}: {exec_info[1]}: {traceback_result}"