diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-11-08 15:20:27 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-21 13:06:45 +0000 |
commit | 41c868d0763232cf23b80b51c48cee566112020e (patch) | |
tree | 02e5d9372ac81cc722eae9c0850a56f74121b60b /bitbake/lib/bb | |
parent | 62113c4fbb7b4c2c2f4859cb5679274b3f60fddb (diff) | |
download | poky-41c868d0763232cf23b80b51c48cee566112020e.tar.gz |
bitbake: 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.
(Bitbake rev: 431e89e322850a2497157c3c0843da9df6bc9a3e)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index fa95f6329f..368264f39a 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -604,13 +604,16 @@ class Tinfoil: | |||
604 | recipecache = self.cooker.recipecaches[mc] | 604 | recipecache = self.cooker.recipecaches[mc] |
605 | prov = self.find_best_provider(pn) | 605 | prov = self.find_best_provider(pn) |
606 | fn = prov[3] | 606 | fn = prov[3] |
607 | actual_pn = recipecache.pkg_fn[fn] | 607 | if fn: |
608 | recipe = TinfoilRecipeInfo(recipecache, | 608 | actual_pn = recipecache.pkg_fn[fn] |
609 | self.config_data, | 609 | recipe = TinfoilRecipeInfo(recipecache, |
610 | pn=actual_pn, | 610 | self.config_data, |
611 | fn=fn, | 611 | pn=actual_pn, |
612 | fns=recipecache.pkg_pn[actual_pn]) | 612 | fn=fn, |
613 | return recipe | 613 | fns=recipecache.pkg_pn[actual_pn]) |
614 | return recipe | ||
615 | else: | ||
616 | return None | ||
614 | 617 | ||
615 | def parse_recipe(self, pn): | 618 | def parse_recipe(self, pn): |
616 | """ | 619 | """ |