fix Config.class_init()

- return error string or None
- release Schema structure after building thr config
This commit is contained in:
Stefan Allius
2024-06-25 23:28:34 +02:00
parent 18f6332784
commit 9e218fdf41

View File

@@ -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