fix Config.class_init()
- return error string or None - release Schema structure after building thr config
This commit is contained in:
@@ -84,7 +84,7 @@ class Config():
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def class_init(cls): # pragma: no cover
|
def class_init(cls) -> None | str: # pragma: no cover
|
||||||
try:
|
try:
|
||||||
# make the default config transparaent by copying it
|
# make the default config transparaent by copying it
|
||||||
# in the config.example file
|
# in the config.example file
|
||||||
@@ -94,7 +94,9 @@ class Config():
|
|||||||
"config/config.example.toml")
|
"config/config.example.toml")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
cls.read()
|
err_str = cls.read()
|
||||||
|
del cls.conf_schema
|
||||||
|
return err_str
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _read_config_file(cls) -> dict: # pragma: no cover
|
def _read_config_file(cls) -> dict: # pragma: no cover
|
||||||
|
|||||||
Reference in New Issue
Block a user