From: Paul Eggleton Date: Tue, 13 Dec 2016 07:09:44 +0000 (+1300) Subject: devtool: prevent BBHandledException from showing traceback X-Git-Tag: uninative-1.5~1100 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=e01b75dff599ffa2b66e6608b28bbb3564365eee;p=openembedded-core.git 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 Signed-off-by: Ross Burton --- 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]: