From 509759ba0dce60f29cdc56354a60a040fbe14904 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Thu, 3 Feb 2022 17:57:50 -0500 Subject: [PATCH] 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 --- moonraker/components/secrets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moonraker/components/secrets.py b/moonraker/components/secrets.py index 54a8c56..578f2e1 100644 --- a/moonraker/components/secrets.py +++ b/moonraker/components/secrets.py @@ -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