Skip to content
Snippets Groups Projects
Commit 370b3e16 authored by Martin Schrön's avatar Martin Schrön
Browse files

Improved get_config for lists

parent 07fe9959
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ def check_config(config, section, key, value=None):
cc = check_config
def get_config(config, section, key, alt=None, dtype=None, range=None, types=str):
def get_config(config, section, key, alt=None, dtype=None, range=0, types=str):
# return None if item does not exist or is empty
r = alt
if section in config:
......@@ -138,7 +138,9 @@ def get_config(config, section, key, alt=None, dtype=None, range=None, types=str
r = str2dt(r)
elif dtype==list:
r = xsplit(r, range=range, type=types)
if not r:
if len(r)>0:
pass
else:
r = []
elif dtype==bool:
r = yesno2bool(r)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment