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:
|
try:
|
||||||
cfg = configparser.ConfigParser(interpolation=None)
|
cfg = configparser.ConfigParser(interpolation=None)
|
||||||
cfg.read_string(data)
|
cfg.read_string(data)
|
||||||
result = dict(cfg)
|
return {sec: dict(cfg.items(sec)) for sec in cfg.sections()}
|
||||||
return result
|
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue