Skip to content

Commit

Permalink
build,json: fix generation with empty profiles
Browse files Browse the repository at this point in the history
If the image generation doesn't add any profiles to the output the
*profile merge* will fail. To avoid that set an empty profile as
fallback.

Signed-off-by: Paul Spooren <mail@aparcar.org>
  • Loading branch information
aparcar committed Jun 21, 2021
1 parent 23c3bab commit fd0d990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/json_overview_image_info.py
Expand Up @@ -42,7 +42,7 @@ def get_initial_output(image_info):
output["profiles"][device_id]["images"].extend(profile["images"])

# make image lists unique by name, keep last/latest
for device_id, profile in output["profiles"].items():
for device_id, profile in output.get("profiles", {}).items():
profile["images"] = list({e["name"]: e for e in profile["images"]}.values())


Expand Down

0 comments on commit fd0d990

Please sign in to comment.