Skip to content

Commit

Permalink
Raise import error when repo configs module cannot be imported (#2065)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 authored Nov 18, 2021
1 parent 2729f17 commit 680a489
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
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 680a489

Please sign in to comment.