[MERGE] dumpstacks fix from 6.1 branch
bzr revid: odo@openerp.com-20120316111105-c2g3mq6gzd9xe7bs
This commit is contained in:
commit
d893cb3e80
|
@ -169,7 +169,7 @@ def dumpstacks(sig, frame):
|
|||
id2name = dict([(threadId, thread.getName()) for threadId, thread in thread_map.items()])
|
||||
code = []
|
||||
for threadId, stack in sys._current_frames().items():
|
||||
code.append("\n# Thread: %s(%d)" % (id2name[threadId], threadId))
|
||||
code.append("\n# Thread: %s(%d)" % (id2name.get(threadId,'n/a'), threadId))
|
||||
for filename, lineno, name, line in traceback.extract_stack(stack):
|
||||
code.append('File: "%s", line %d, in %s' % (filename, lineno, name))
|
||||
if line:
|
||||
|
|
Loading…
Reference in New Issue