def format_trace(self):
if self.has_trace():
# convert trace entries back to tuples. the trace member was
# set by the server side rpc mechanism. rpc messages cannot
# contain tuples (incompatible with JSON) so the entries were
# converted to lists.
convert = []
for entry in self.trace:
convert.append(tuple(entry))
formatted = traceback.format_list(convert)
return ''.join(formatted)
return ''
评论列表
文章目录