From b125a56f86ba213676e703d823901b2cd4cc2585 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Mon, 1 Jun 2020 11:40:34 +0300 Subject: [PATCH] Make sure configuration path loaded from an environment variable name is lower-case --- server/config/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/config/basic.py b/server/config/basic.py index e86752e..0ad07d5 100644 --- a/server/config/basic.py +++ b/server/config/basic.py @@ -57,7 +57,7 @@ class BasicConfig: keys = sorted(k for k in os.environ if k.startswith(prefix)) for key in keys: - path = key[len(prefix) :].replace(EXTRA_CONFIG_VALUES_ENV_KEY_SEP, ".") + path = key[len(prefix) :].replace(EXTRA_CONFIG_VALUES_ENV_KEY_SEP, ".").lower() result = ConfigTree.merge_configs( result, ConfigFactory.parse_string(f"{path}: {os.environ[key]}") ) @@ -77,7 +77,7 @@ class BasicConfig: if not path.is_dir() and str(path) != DEFAULT_EXTRA_CONFIG_PATH ] if invalid: - print(f"WARNING: Invalid paths in {key} env var: {' '.join(invalid)}") + print(f"WARNING: Invalid paths in {key} env var: {' '.join(map(str, invalid))}") return [path for path in paths if path.is_dir()] def _load(self, verbose=True):