aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-10-14 16:43:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-19 17:57:58 +0100
commit5a02ec217d6c67db9dedf39d63cec504b87506b2 (patch)
tree776a747046d3fb052759d573c8be433e46bf097c /scripts
parent3aac11076e22ac4fea48f5404110bb959547a9fe (diff)
downloadopenembedded-core-contrib-5a02ec217d6c67db9dedf39d63cec504b87506b2.tar.gz
devtool: extract: fix error handling
If recipe parsing fails we need to exit out instead of attempting to use the data object that's set to None, which resulted in a traceback. (From OE-Core rev: a46fb1a06be2df00a0bceb4e60ebdecb55b5974c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 6ce3144dd0..5d7e903670 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -225,6 +225,9 @@ def extract(args, config, basepath, workspace):
import bb
tinfoil = _prep_extract_operation(config, basepath, args.recipename)
+ if not tinfoil:
+ # Error already shown
+ return 1
rd = parse_recipe(config, tinfoil, args.recipename, True)
if not rd:
@@ -271,6 +274,8 @@ def _prep_extract_operation(config, basepath, recipename):
trying to extract a package. Returns the tinfoil instance to be used."""
tinfoil = setup_tinfoil(basepath=basepath)
rd = parse_recipe(config, tinfoil, recipename, True)
+ if not rd:
+ return None
if bb.data.inherits_class('kernel-yocto', rd):
tinfoil.shutdown()
@@ -500,6 +505,9 @@ def modify(args, config, basepath, workspace):
args.srctree)
if args.extract:
tinfoil = _prep_extract_operation(config, basepath, args.recipename)
+ if not tinfoil:
+ # Error already shown
+ return 1
else:
tinfoil = setup_tinfoil(basepath=basepath)