Support sections with empty bodies in the YAML configuration files.

This commit is contained in:
Fabio Manganiello 2022-07-16 02:09:22 +02:00
parent cc29136db7
commit 3edb8352b4
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -213,11 +213,10 @@ class Config:
config['scripts_dir'] = os.path.abspath(
os.path.expanduser(file_config[section])
)
elif (
'disabled' not in file_config[section]
or file_config[section]['disabled'] is False
):
config[section] = file_config[section]
else:
section_config = file_config.get(section, {}) or {}
if not section_config.get('disabled'):
config[section] = section_config
return config