summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 20:09:44 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 09:56:36 +0000
commite01b75dff599ffa2b66e6608b28bbb3564365eee (patch)
treeafa49b593a2d88b261b4910541929533fb4623bf
parentb0169796f294bbec0397b7eae86454a46b68cdc5 (diff)
downloadopenembedded-core-contrib-e01b75dff599ffa2b66e6608b28bbb3564365eee.tar.gz
openembedded-core-contrib-e01b75dff599ffa2b66e6608b28bbb3564365eee.tar.bz2
openembedded-core-contrib-e01b75dff599ffa2b66e6608b28bbb3564365eee.zip
devtool: prevent BBHandledException from showing traceback
If we don't catch this then attempting to run devtool in non-memres mode when bitbake is already running will produce a traceback instead of just an error message. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xscripts/devtool11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 219749365c..578db5a68b 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -288,11 +288,14 @@ def main():
scriptutils.logger_setup_color(logger, global_args.color)
if global_args.bbpath is None:
- tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
try:
- global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True)
- finally:
- tinfoil.shutdown()
+ tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
+ try:
+ global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True)
+ finally:
+ tinfoil.shutdown()
+ except bb.BBHandledException:
+ return 2
# Search BBPATH first to allow layers to override plugins in scripts_path
for path in global_args.bbpath.split(':') + [scripts_path]: