summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/exceptions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/exceptions.py b/bitbake/lib/bb/exceptions.py
index 13269de8c1..e134ae136d 100644
--- a/bitbake/lib/bb/exceptions.py
+++ b/bitbake/lib/bb/exceptions.py
@@ -53,3 +53,9 @@ def format_exception(etype, value, tb, context=1, limit=None, formatter=None):
53 formatted.extend(format_extracted(tb, formatter, limit)) 53 formatted.extend(format_extracted(tb, formatter, limit))
54 formatted.extend(traceback.format_exception_only(etype, value)) 54 formatted.extend(traceback.format_exception_only(etype, value))
55 return formatted 55 return formatted
56
57def to_string(exc):
58 if isinstance(exc, SystemExit):
59 if not isinstance(exc.code, basestring):
60 return 'Exited with "%d"' % exc.code
61 return str(exc)