From 885d98a9925f13c66a995fa01f6ef7782a0a2692 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Fri, 21 Dec 2018 12:37:03 +0100 Subject: [PATCH] Fix handling of invalid recipes The current implementation assumes that there a single recipe file for a recipe. A common use case for using InvalidRecipeError if for recipes that have different implementations on different platforms, or when a recipe override is only valid for a given platform. In those cases we can have several recipes with the same name, when one or many raise an InvalidRecipeError but others won't --- cerbero/build/cookbook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cerbero/build/cookbook.py b/cerbero/build/cookbook.py index f54c02cb7..1c3848702 100644 --- a/cerbero/build/cookbook.py +++ b/cerbero/build/cookbook.py @@ -170,9 +170,9 @@ class CookBook (object): @param name: name of the recipe @type name: str ''' - if name in self._invalid_recipes: - raise self._invalid_recipes[name] if name not in self.recipes: + if name in self._invalid_recipes: + raise self._invalid_recipes[name] raise RecipeNotFoundError(name) return self.recipes[name] -- GitLab