From 9e218fdf41ae59d70e626474f5a5bd58fe9cbb3a Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Tue, 25 Jun 2024 23:28:34 +0200 Subject: [PATCH] fix Config.class_init() - return error string or None - release Schema structure after building thr config --- app/src/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/config.py b/app/src/config.py index e1ef749..8121c86 100644 --- a/app/src/config.py +++ b/app/src/config.py @@ -84,7 +84,7 @@ class Config(): ) @classmethod - def class_init(cls): # pragma: no cover + def class_init(cls) -> None | str: # pragma: no cover try: # make the default config transparaent by copying it # in the config.example file @@ -94,7 +94,9 @@ class Config(): "config/config.example.toml") except Exception: pass - cls.read() + err_str = cls.read() + del cls.conf_schema + return err_str @classmethod def _read_config_file(cls) -> dict: # pragma: no cover