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 untrusted user: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 3 additions and 1 deletions

View File

@ -215,7 +215,9 @@ class Config:
)
else:
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
return config