Permalink
Switch branches/tags
Nothing to show
Find file
8fbb79f Mar 9, 2011
14 lines (12 sloc) 335 Bytes
import sys
def construct_try(func):
try:
return func()
except Exception, e:
tb = sys.exc_traceback
while tb is not None:
self = tb.tb_frame.f_locals.get('self')
if self is not None:
print >> sys.stderr, 'self tb:', self
tb = tb.tb_next
raise