Skip to content

Commit

Permalink
Raise import error when repo configs module cannot be imported
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Nov 18, 2021
1 parent 640fd68 commit ebcbdab
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -15,6 +15,7 @@
from feast import FeatureStore, FeatureView, RepoConfig, driver_test_data
from feast.constants import FULL_REPO_CONFIGS_MODULE_ENV_NAME
from feast.data_source import DataSource
from feast.errors import FeastModuleImportError
from tests.integration.feature_repos.integration_test_repo_config import (
IntegrationTestRepoConfig,
)
Expand Down Expand Up @@ -86,8 +87,10 @@
try:
module = importlib.import_module(full_repo_configs_module)
FULL_REPO_CONFIGS = getattr(module, "FULL_REPO_CONFIGS")
except Exception:
FULL_REPO_CONFIGS = DEFAULT_FULL_REPO_CONFIGS
except Exception as e:
raise FeastModuleImportError(
"FULL_REPO_CONFIGS", full_repo_configs_module
) from e
else:
FULL_REPO_CONFIGS = DEFAULT_FULL_REPO_CONFIGS

Expand Down

0 comments on commit ebcbdab

Please sign in to comment.