From a2a4312f5b0dff4208b67fedb0ac9433a9f66762 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 29 Jun 2026 21:56:17 +0200 Subject: [PATCH] App.get_values(): Filter out empty split results get_values() splits comma-separated values and strips whitespace but does not filter out empty strings. A value like "a, b, " produces ['a', 'b', ''], with an empty string at the end. This empty string propagates to callers like CmdRequiredOsPkg.py and pollutes output. Add a filter for non-empty stripped values. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev Signed-off-by: Jan Lindemann --- src/python/jw/pkg/App.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/python/jw/pkg/App.py b/src/python/jw/pkg/App.py index c474ead0..3dfee93c 100644 --- a/src/python/jw/pkg/App.py +++ b/src/python/jw/pkg/App.py @@ -584,7 +584,10 @@ class App(Base): for key in keys: vals = self.get_value(p, section, key) if vals: - ret += [val.strip() for val in vals.split(',')] + for val in vals.split(','): + stripped = val.strip() + if stripped: + ret.append(stripped) return list(dict.fromkeys(ret)) # Remove duplicates, keep ordering def get_project_refs(