From: Eric Fahlgren Date: Wed, 11 Mar 2026 20:16:34 +0000 (-0700) Subject: build: reject non-matching artifacts X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F22385%2Fhead;p=thirdparty%2Fopenwrt.git build: reject non-matching artifacts Check for malformed artifact names before dereferencing them. Fixes: https://github.com/openwrt/openwrt/commit/5816d883ff3884ae96c3293b316f6d56c099eee0 Signed-off-by: Eric Fahlgren Link: https://github.com/openwrt/openwrt/pull/22385 Signed-off-by: Robert Marko --- diff --git a/scripts/json_overview_image_info.py b/scripts/json_overview_image_info.py index c8d0e0ad452..0449bb56d7e 100755 --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py @@ -36,8 +36,9 @@ def add_artifact(artifact, prefix="openwrt-"): output[artifact] = {} for file in files: file = str(file.name) - arch = re.match(r".*Linux-([^.]*)\.", file).group(1) - output[artifact][arch] = file + arch = re.match(r".*Linux-([^.]*)\.", file) + if arch: + output[artifact][arch.group(1)] = file for json_file in work_dir.glob("*.json"):