aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-11-08 15:20:27 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-11 12:19:13 +0000
commit431e89e322850a2497157c3c0843da9df6bc9a3e (patch)
tree3fd741118de8fe7c175785c97f815274ec2bb6e6 /lib
parent1060955c4aa2ef66cdb4f0549f9bd8c1c332673c (diff)
downloadbitbake-431e89e322850a2497157c3c0843da9df6bc9a3e.zip
bitbake-431e89e322850a2497157c3c0843da9df6bc9a3e.tar.gz
bitbake-431e89e322850a2497157c3c0843da9df6bc9a3e.tar.bz2
tinfoil: ensure get_recipe_info() returns Null if recipe not found
If a matching recipe is not found then return Null instead of raising KeyError because we were blindly using None as a key for pkg_fn. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/tinfoil.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index fa95f63..368264f 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -604,13 +604,16 @@ class Tinfoil:
recipecache = self.cooker.recipecaches[mc]
prov = self.find_best_provider(pn)
fn = prov[3]
- actual_pn = recipecache.pkg_fn[fn]
- recipe = TinfoilRecipeInfo(recipecache,
- self.config_data,
- pn=actual_pn,
- fn=fn,
- fns=recipecache.pkg_pn[actual_pn])
- return recipe
+ if fn:
+ actual_pn = recipecache.pkg_fn[fn]
+ recipe = TinfoilRecipeInfo(recipecache,
+ self.config_data,
+ pn=actual_pn,
+ fn=fn,
+ fns=recipecache.pkg_pn[actual_pn])
+ return recipe
+ else:
+ return None
def parse_recipe(self, pn):
"""