MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / compact_traceback

Function compact_traceback

src/network/asyncore_pollchoose.py:841–859  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

839# ---------------------------------------------------------------------------
840
841def compact_traceback():
842 t, v, tb = sys.exc_info()
843 tbinfo = []
844 if not tb: # Must have a traceback
845 raise AssertionError("traceback does not exist")
846 while tb:
847 tbinfo.append((
848 tb.tb_frame.f_code.co_filename,
849 tb.tb_frame.f_code.co_name,
850 str(tb.tb_lineno)
851 ))
852 tb = tb.tb_next
853
854 # just to be safe
855 del tb
856
857 file, function, line = tbinfo[-1]
858 info = ' '.join(['[%s|%s|%s]' % x for x in tbinfo])
859 return (file, function, line), t, v, info
860
861def close_all(map=None, ignore_all=False):
862 if map is None:

Callers 1

handle_errorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected