Support sections with empty bodies in the YAML configuration files.
This commit is contained in:
parent
cc29136db7
commit
3edb8352b4
1 changed files with 4 additions and 5 deletions
|
@ -213,11 +213,10 @@ class Config:
|
||||||
config['scripts_dir'] = os.path.abspath(
|
config['scripts_dir'] = os.path.abspath(
|
||||||
os.path.expanduser(file_config[section])
|
os.path.expanduser(file_config[section])
|
||||||
)
|
)
|
||||||
elif (
|
else:
|
||||||
'disabled' not in file_config[section]
|
section_config = file_config.get(section, {}) or {}
|
||||||
or file_config[section]['disabled'] is False
|
if not section_config.get('disabled'):
|
||||||
):
|
config[section] = section_config
|
||||||
config[section] = file_config[section]
|
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue