App.get_values(): Filter out empty split results
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m20s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m29s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m0s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m14s
CI / Packaging test (push) Successful in 0s

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 <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-29 21:56:17 +02:00
commit a2a4312f5b
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -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(