1.1 --- a/imiptools/__init__.py Tue Feb 10 16:43:16 2015 +0100
1.2 +++ b/imiptools/__init__.py Tue Feb 10 17:26:23 2015 +0100
1.3 @@ -288,7 +288,12 @@
1.4 if "-v" in args:
1.5 raise
1.6 type, value, tb = sys.exc_info()
1.7 - print >>sys.stderr, "Exception %s at %d" % (exc, tb.tb_lineno)
1.8 + while tb.tb_next:
1.9 + tb = tb.tb_next
1.10 + f = tb.tb_frame
1.11 + co = f and f.f_code
1.12 + filename = co and co.co_filename
1.13 + print >>sys.stderr, "Exception %s at %d in %s" % (exc, tb.tb_lineno, filename)
1.14 #import traceback
1.15 #traceback.print_exc(file=open("/tmp/mail.log", "a"))
1.16 sys.exit(EX_TEMPFAIL)