Commit 14cbd8fb authored by Paul Spooren's avatar Paul Spooren Committed by Daniel Golle
Browse files

scripts: JSON merge don't crash if no JSON found

The JSON `WORK_DIR` ($(KDIR)/json_info_files) is only created if the new
image generation methods from `` are used. However some targets
like `armvirt` do not use it yet, so the folder is never created.

The `` script used to raise an error if the
given `WORK_DIR` isn't a folder, however it should just notify about
missing JSON files.

This patch removes the Python assert and exists with code 0 even if no
JSON files were found, as this is not necessarily an error but simply
not yet implemented. Using `glob` on an not existing `Path` results in
an empty list, therefore the for loop won't run.
Signed-off-by: default avatarPaul Spooren <>
CC: Petr Štetiar <>
parent 0bea89a1
......@@ -15,8 +15,6 @@ assert getenv("WORK_DIR"), "$WORK_DIR required"
work_dir = Path(getenv("WORK_DIR"))
assert work_dir.is_dir(), "$WORK_DIR not a directory"
output = {}
for json_file in work_dir.glob("*.json"):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment