lorax-composer: Fix customizations when creating a recipe
This fixes the customizations list problem earlier than in add_customizations. In the recipe it should be [customizations] not [[customizations]] which creates a list. If it was used that way grab the first element and replace the list with it. (cherry picked from commit67007dfa60
) (cherry picked from commit84a9fcccde
)
This commit is contained in:
parent
6368b0e83b
commit
acad424005
@ -301,6 +301,12 @@ def recipe_from_dict(recipe_dict):
|
||||
description = recipe_dict["description"]
|
||||
version = recipe_dict.get("version", None)
|
||||
customizations = recipe_dict.get("customizations", None)
|
||||
|
||||
# [customizations] was incorrectly documented at first, so we have to support using it
|
||||
# as [[customizations]] by grabbing the first element.
|
||||
if isinstance(customizations, list):
|
||||
customizations = customizations[0]
|
||||
|
||||
except KeyError as e:
|
||||
raise RecipeError("There was a problem parsing the recipe: %s" % str(e))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user