Added tests for config file, added logger for config file

This commit is contained in:
TheNetworkGuy
2025-04-28 15:35:51 +02:00
parent 04a610cf84
commit 819126ce36
2 changed files with 133 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ from importlib import util
from os import environ
from logging import getLogger
logger = getLogger(__name__)
DEFAULT_CONFIG = {
"templates_config_context": False,
"templates_config_context_overrule": False,
@@ -56,7 +58,7 @@ def load_config_file(config_default, config_file="config.py"):
dconf[key] = getattr(config_module, key)
return dconf
else:
getLogger(__name__).warning(
logger.warning(
"Config file %s not found. Using default config "
"and environment variables.", config_file)
return None