aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2021-06-20 20:23:45 -1000
committerPaul Spooren <mail@aparcar.org>2021-06-20 22:42:29 -1000
commitfd0d9909bf50f114d5e7f7cedf53e542de878a2c (patch)
tree8f1463c4508eb1e7188416af3335ee389920fa0f /scripts
parent23c3bab9209f984692f8206c0d97758ee223a26f (diff)
downloadupstream-fd0d9909bf50f114d5e7f7cedf53e542de878a2c.tar.gz
upstream-fd0d9909bf50f114d5e7f7cedf53e542de878a2c.tar.bz2
upstream-fd0d9909bf50f114d5e7f7cedf53e542de878a2c.zip
build,json: fix generation with empty profiles
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/json_overview_image_info.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py
index 45c05012b1..db47fd9e42 100755
--- a/scripts/json_overview_image_info.py
+++ b/scripts/json_overview_image_info.py
@@ -42,7 +42,7 @@ for json_file in work_dir.glob("*.json"):
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())