import optparse
import warnings
+from traceback import format_exception
import bb
import bb.msg
from bb import cooker
self.pkgs_to_build = []
+def print_exception(exc, value, tb):
+ """Send exception information through bb.msg"""
+ bb.fatal("".join(format_exception(exc, value, tb)))
+
+sys.excepthook = print_exception
+
+
_warnings_showwarning = warnings.showwarning
def _showwarning(message, category, filename, lineno, file=None, line=None):
"""Display python warning messages using bb.msg"""