From 7a1c8494fbf179f294d6978f1e2be1ba9a0e0a24 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Thu, 20 Aug 2020 03:29:07 +0200 Subject: [PATCH] skip releases that have no profiles.json --- misc/collect.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/collect.py b/misc/collect.py index 2e6016d..df18e27 100755 --- a/misc/collect.py +++ b/misc/collect.py @@ -172,14 +172,17 @@ def scrape_wget(args): release = os.path.basename(path) base = path[len(tmp_dir) + 1 :] - versions[release.upper()] = f"data/{release}/overview.json" - os.system(f"mkdir -p {selector_path}/data/{release}/") - profiles = {} for ppath in Path(path).rglob("profiles.json"): with open(ppath, "r") as file: profiles[ppath] = file.read() + if len(profiles) == 0: + continue + + versions[release.upper()] = f"data/{release}/overview.json" + os.system(f"mkdir -p {selector_path}/data/{release}/") + output = merge_profiles(profiles, f"https://{base}/targets/{{target}}") Path(f"{data_path}/{release}").mkdir(parents=True, exist_ok=True) -- 2.30.2