Skip to content
Snippets Groups Projects
Commit 2cc34496 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

ENV replaces - with _ now

parent 5d48e9be
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ def initialize_config(application_name: str, default_config: str, app) -> dict: ...@@ -67,7 +67,7 @@ def initialize_config(application_name: str, default_config: str, app) -> dict:
# Generate a environment variable name from the application name # Generate a environment variable name from the application name
# E.g. "foo bar" becomes "FOO_BAR_CONFIG_PATH" # E.g. "foo bar" becomes "FOO_BAR_CONFIG_PATH"
config_path_environment_variable = "{}_CONFIG_PATH".format(application_name.upper().replace(" ", "_")) config_path_environment_variable = "{}_CONFIG_PATH".format(application_name.upper().replace(" ", "_").replace("-", "_"))
# If the environment variable is set, use that as a config path, otherwise use the default one # If the environment variable is set, use that as a config path, otherwise use the default one
config_dir = this_or_else(os.environ.get(config_path_environment_variable), dirs["config"]) config_dir = this_or_else(os.environ.get(config_path_environment_variable), dirs["config"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment