secrets: fix ConfigParser to Dict conversion

The result should be a dictionary of dictionaries rather than a
dictionary of SectionProxy objects.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-02-03 17:57:50 -05:00
parent 5a966836b5
commit 509759ba0d
1 changed files with 1 additions and 2 deletions

View File

@ -60,8 +60,7 @@ class Secrets:
try:
cfg = configparser.ConfigParser(interpolation=None)
cfg.read_string(data)
result = dict(cfg)
return result
return {sec: dict(cfg.items(sec)) for sec in cfg.sections()}
except Exception:
return None