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:
parent
5a966836b5
commit
509759ba0d
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue