aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/json_overview_image_info.py
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2021-06-20 20:23:45 -1000
committerPaul Spooren <mail@aparcar.org>2021-06-21 09:43:21 -1000
commit2e157714a8d4a0e1dbd6351ca0a3fe2fce75b0eb (patch)
tree48b86e7b73a62497b2f9fa7804f3ebcb3d39b52f /scripts/json_overview_image_info.py
parent8add3e139ca5b58b91098aa0615f3492d1191241 (diff)
downloadupstream-2e157714a8d4a0e1dbd6351ca0a3fe2fce75b0eb.tar.gz
upstream-2e157714a8d4a0e1dbd6351ca0a3fe2fce75b0eb.tar.bz2
upstream-2e157714a8d4a0e1dbd6351ca0a3fe2fce75b0eb.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> (cherry picked from commit fd0d9909bf50f114d5e7f7cedf53e542de878a2c)
Diffstat (limited to 'scripts/json_overview_image_info.py')
-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())