Quellcode durchsuchen

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 <[email protected]>
Paul Spooren vor 4 Jahren
Ursprung
Commit
fd0d9909bf
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      scripts/json_overview_image_info.py

+ 1 - 1
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())