summaryrefslogtreecommitdiffstats
path: root/lib/bb/utils.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-17 10:48:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-18 11:13:13 +0100
commit8a8bafc8ded98364a31878b23c64503a53affcd1 (patch)
treee1b80badcbdd353497d8826d617869d9756717f9 /lib/bb/utils.py
parent89b31a4fb44f2c2ad0bb4210151652cd3730418d (diff)
downloadopenembedded-core-contrib-8a8bafc8ded98364a31878b23c64503a53affcd1.tar.gz
utils: Don't show stack traces for BBHandledException
A BBHandledException means we already showed an error to the user so we shouldn't show a stack trace as this just confuses things further. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r--lib/bb/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index f9ee4f1c1d..560f55a074 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -354,6 +354,9 @@ def better_exec(code, context, text = None, realfile = "<code>"):
code = better_compile(code, realfile, realfile)
try:
exec(code, get_context(), context)
+ except bb.BBHandledException:
+ # Error already shown so passthrough
+ raise
except Exception as e:
(t, value, tb) = sys.exc_info()