From a4ceb982ea955e504610e1470a6cdcc874d0a83f Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 24 Jul 2023 11:51:03 -0400 Subject: [PATCH] do not raise if the app cannot load an env specific config file w/ burnettk --- .../src/spiffworkflow_backend/config/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py b/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py index fe342b0b1..4f151257c 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/config/__init__.py @@ -68,9 +68,9 @@ def load_config_file(app: Flask, env_config_module: str) -> None: try: app.config.from_object(env_config_module) print(f"loaded config: {env_config_module}") - except ImportStringError as exception: - if os.environ.get("SPIFFWORKFLOW_BACKEND_TERRAFORM_DEPLOYED_ENVIRONMENT") != "true": - raise ModuleNotFoundError(f"Cannot find config module: {env_config_module}") from exception + except ImportStringError: + # ignore this error + pass def _set_up_tenant_specific_fields_as_list_of_strings(app: Flask) -> None: