Follow the config parser way part4

This commit is contained in:
henryruhs
2025-03-09 23:46:59 +01:00
parent b480c76e35
commit 89c0493acd
2 changed files with 2 additions and 7 deletions

View File

@@ -68,7 +68,7 @@ def get_int_list(section : str, option : str, fallback : Optional[str] = None) -
config_parser = get_config_parser()
if config_parser.has_option(section, option) and config_parser.get(section, option).strip():
return [ cast_int(value) for value in config_parser.get(section, option).split() ]
return list(map(int, config_parser.get(section, option).split()))
if fallback:
return [ cast_int(value) for value in fallback.split() ]
return list(map(int, fallback.split()))
return None

View File

@@ -39,11 +39,6 @@ def before_all() -> None:
{
'valid': '1 2 3',
'unset': ''
},
'float_list':
{
'valid': '1.0 2.0 3.0',
'unset': ''
}
})