Fix settings loader to return empty list when splitting empty string value

This commit is contained in:
Clemens Schwaighofer
2026-01-06 09:58:21 +09:00
parent a73ced0067
commit 2923a3e88b
4 changed files with 82 additions and 62 deletions

View File

@@ -173,10 +173,13 @@ class SettingsLoader:
args_overrride.append(key)
if skip:
continue
settings[config_id][key] = [
__value.replace(" ", "")
for __value in settings[config_id][key].split(split_char)
]
if settings[config_id][key]:
settings[config_id][key] = [
__value.replace(" ", "")
for __value in settings[config_id][key].split(split_char)
]
else:
settings[config_id][key] = []
except KeyError as e:
raise ValueError(self.__print(
f"[!] Cannot read [{config_id}] block because the entry [{e}] could not be found",