]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: catch BBHandledException from parsing
authorChristopher Larson <kergoth@gmail.com>
Mon, 29 Jun 2015 15:20:19 +0000 (08:20 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2015 11:28:12 +0000 (12:28 +0100)
This ensures that we don't see a traceback on parsing failures.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/recipetool

index c68bef4c96b9f360d74e584ec9d715a0c7b6835b..3063cf7c4326d685e9b3519836029806eb62f9e9 100755 (executable)
@@ -82,9 +82,11 @@ def main():
 
     scriptutils.logger_setup_color(logger, args.color)
 
-    tinfoil_init(getattr(args, 'parserecipes', False))
-
-    ret = args.func(args)
+    try:
+        tinfoil_init(getattr(args, 'parserecipes', False))
+        ret = args.func(args)
+    except bb.BBHandledException:
+        ret = 1
 
     return ret