mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
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)
This commit is contained in:
parent
8add3e139c
commit
2e157714a8
@ -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())
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user