def _failureOldStyle(fail):
 import linecache
 tb = []
 for f in fail.frames:
  tb.append((f[1], f[2], f[0], linecache.getline(f[1], f[2])))
 return {'traceback': tb, 'exception': traceback.format_exception_only(fail.type, fail.value)}

def _failureOldStyle ( fail ) : import linecache tb = [ ] for f in fail . frames : tb . append ( ( f [ 1 ] , f [ 2 ] , f [ 0 ] , linecache . getline ( f [ 1 ] , f [ 2 ] ) ) ) return { 'traceback' : tb , 'exception' : traceback . format_exception_only ( fail . type , fail . value ) }
pre-failure manhole representation of exceptions .