MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / allThreadTraceback

Function allThreadTraceback

src/helper_generic.py:36–45  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

34 return int(hexlify(s), 16)
35
36def allThreadTraceback(frame):
37 id2name = dict([(th.ident, th.name) for th in enumerate()])
38 code = []
39 for threadId, stack in sys._current_frames().items():
40 code.append("\n# Thread: %s(%d)" % (id2name.get(threadId,""), threadId))
41 for filename, lineno, name, line in traceback.extract_stack(stack):
42 code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
43 if line:
44 code.append(" %s" % (line.strip()))
45 print "\n".join(code)
46
47def signal_handler(signal, frame):
48 logger.error("Got signal %i in %s/%s", signal, current_process().name, current_thread().name)

Callers 1

signal_handlerFunction · 0.85

Calls 2

itemsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected