diff options
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index c0eb713f55..518a38ab81 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -29,6 +29,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), | |||
29 | 29 | ||
30 | import optparse | 30 | import optparse |
31 | import warnings | 31 | import warnings |
32 | from traceback import format_exception | ||
32 | import bb | 33 | import bb |
33 | import bb.msg | 34 | import bb.msg |
34 | from bb import cooker | 35 | from bb import cooker |
@@ -55,6 +56,13 @@ class BBConfiguration(object): | |||
55 | self.pkgs_to_build = [] | 56 | self.pkgs_to_build = [] |
56 | 57 | ||
57 | 58 | ||
59 | def print_exception(exc, value, tb): | ||
60 | """Send exception information through bb.msg""" | ||
61 | bb.fatal("".join(format_exception(exc, value, tb))) | ||
62 | |||
63 | sys.excepthook = print_exception | ||
64 | |||
65 | |||
58 | _warnings_showwarning = warnings.showwarning | 66 | _warnings_showwarning = warnings.showwarning |
59 | def _showwarning(message, category, filename, lineno, file=None, line=None): | 67 | def _showwarning(message, category, filename, lineno, file=None, line=None): |
60 | """Display python warning messages using bb.msg""" | 68 | """Display python warning messages using bb.msg""" |