aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/email
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-18 06:50:40 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-18 06:50:40 -0400
commit54113960c5633c4f43865f68c8463e05d1cfbc1a (patch)
tree48912f87e3fa31c56eeb7d4c6cc36a0cae29eecf /interfaces/email
parent574dd85e5fcb6e03269d4bc3077ff1227c35b5f3 (diff)
downloadbugseverywhere-54113960c5633c4f43865f68c8463e05d1cfbc1a.tar.gz
Added tracebacks to be-handle-mail's "uncaught exceptions".
Diffstat (limited to 'interfaces/email')
-rwxr-xr-xinterfaces/email/interactive/be-handle-mail3
1 files changed, 2 insertions, 1 deletions
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 <wking@thor.physics.drexel.edu>"
@@ -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__":