]> git.pld-linux.org Git - projects/pld-builder.new.git/blob - PLD_Builder/wrap.py
- cleanups
[projects/pld-builder.new.git] / PLD_Builder / wrap.py
1 import sys
2 import log
3 import traceback
4 import StringIO
5
6 import status
7
8 def wrap(main):
9   try:
10     main()
11   except:
12     exctype, value = sys.exc_info()[:2]
13     if exctype == SystemExit:
14       sys.exit(value)
15     s = StringIO.StringIO()
16     traceback.print_exc(file = s, limit = 20)
17     log.alert("fatal python exception during: %s" % status.get())
18     log.alert(s.getvalue())
19     sys.exit(1)
This page took 0.202391 seconds and 4 git commands to generate.