summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-05 14:42:07 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 19:55:02 +1300
commitb2b5d14d38ffd6de1dbe86f17545c5938e918dda (patch)
tree4897869ee8216cac6a1a7e0e22880ed9364b55e6
parent6755735121ae740ca8c2074c4ce7273c5fce9a5a (diff)
downloadopenembedded-core-contrib-b2b5d14d38ffd6de1dbe86f17545c5938e918dda.tar.gz
openembedded-core-contrib-b2b5d14d38ffd6de1dbe86f17545c5938e918dda.tar.bz2
openembedded-core-contrib-b2b5d14d38ffd6de1dbe86f17545c5938e918dda.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>
-rwxr-xr-xscripts/devtool11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 0c32c502a3..656898a66f 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
for path in [scripts_path] + global_args.bbpath.split(':'):
pluginpath = os.path.join(path, 'lib', 'devtool')