From b9592bd3c1ab2155b9f62d18ce593b9c88eff279 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 7 Feb 2017 09:45:43 +1300 Subject: devtool: improve parse failure handling With the move to tinfoil2, the behaviour when parsing failed has changed a bit - exceptions are now raised, so handle these appropriately. Specifically when if parsing the recipe created when running devtool add fails, rename it to .bb.parsefailed so that the user can run bitbake afterwards without parsing being interrupted. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/lib/devtool/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/lib/devtool/__init__.py') diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index fd2f042ba5..91111e1109 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py @@ -135,7 +135,12 @@ def parse_recipe(config, tinfoil, pn, appends, filter_workspace=True): not path.startswith(config.workspace_path)] else: append_files = None - return tinfoil.parse_recipe_file(recipefile, appends, append_files) + try: + rd = tinfoil.parse_recipe_file(recipefile, appends, append_files) + except Exception as e: + logger.error(str(e)) + return None + return rd def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False): """ -- cgit v1.2.3