Преглед на файлове

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>
Paul Eggleton преди 7 години
родител
ревизия
e01b75dff5
променени са 1 файла, в които са добавени 7 реда и са изтрити 4 реда
  1. 7 4
      scripts/devtool

+ 7 - 4
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]: