FIX: More robust logic against section configurations that may not be maps

This commit is contained in:
Fabio Manganiello 2022-08-31 01:27:53 +02:00
parent a675fe6a92
commit db45d7ecbf
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -215,7 +215,9 @@ class Config:
) )
else: else:
section_config = file_config.get(section, {}) or {} section_config = file_config.get(section, {}) or {}
if not section_config.get('disabled'): if not (
hasattr(section_config, 'get') and section_config.get('disabled')
):
config[section] = section_config config[section] = section_config
return config return config