From: W. Trevor King Date: Sat, 18 Jul 2009 10:50:40 +0000 (-0400) Subject: Added tracebacks to be-handle-mail's "uncaught exceptions". X-Git-Tag: 1.0.0~62^2~46^2~55 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=54113960c5633c4f43865f68c8463e05d1cfbc1a;p=be.git Added tracebacks to be-handle-mail's "uncaught exceptions". --- diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index 13dd039..caa833c 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -37,6 +37,7 @@ import os.path import send_pgp_mime import sys import time +import traceback SUBJECT_COMMENT = "[be-bug]" HANDLER_ADDRESS = "BE Bugs " @@ -258,6 +259,7 @@ def main(): except Exception, e: if LOGFILE != None: LOGFILE.write("Uncaught exception:\n%s\n" % (e,)) + traceback.print_tb(sys.exc_traceback, file=LOGFILE) close_logfile() sys.exit(1) response_email = compose_response(ret, out_text, err_text, info).plain() @@ -265,7 +267,6 @@ def main(): print send_pgp_mime.flatten(response_email) else: send_pgp_mime.mail(response_email, send_pgp_mime.sendmail) - close_logfile() if __name__ == "__main__":