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
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.devSigned-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
42f064de89
commit
a2a4312f5b
1 changed files with 4 additions and 1 deletions
|
|
@ -584,7 +584,10 @@ class App(Base):
|
||||||
for key in keys:
|
for key in keys:
|
||||||
vals = self.get_value(p, section, key)
|
vals = self.get_value(p, section, key)
|
||||||
if vals:
|
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
|
return list(dict.fromkeys(ret)) # Remove duplicates, keep ordering
|
||||||
|
|
||||||
def get_project_refs(
|
def get_project_refs(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue