8 # this module, as it deals with internal error handling shouldn't
9 # import anything beside status
17 exctype, value = sys.exc_info()[:2]
18 if exctype == SystemExit:
20 s = StringIO.StringIO()
21 traceback.print_exc(file = s, limit = 20)
22 log.alert("fatal python exception")
23 log.alert(s.getvalue())
24 log.alert("during: %s" % status.get())
26 # don't use mailer.py; it safer this way
27 f = os.popen("/usr/sbin/sendmail -t", "w")
28 f.write("""Subject: builder failure
32 X-PLD-Builder: fatal error report
37 """ % (status.admin, status.email, time.asctime(), s.getvalue(), status.get()))