From 77a794790a17e9d2a2fbf8170c38f0d57b878418 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Tue, 2 Apr 2024 17:56:52 +0200 Subject: [PATCH] fixup! Issue #139 add backend-aware collection allow-list config option --- src/openeo_aggregator/backend.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/openeo_aggregator/backend.py b/src/openeo_aggregator/backend.py index 3799d11..7bef2aa 100644 --- a/src/openeo_aggregator/backend.py +++ b/src/openeo_aggregator/backend.py @@ -213,14 +213,8 @@ def _get_all_metadata(self) -> Tuple[List[dict], _InternalCollectionMetadata]: """ # Group collection metadata by hierarchically: collection id -> backend id -> metadata grouped = defaultdict(dict) - # TODO: remove this deprecated collection_whitelist - collection_whitelist: Optional[List[Union[str, re.Pattern]]] = get_backend_config().collection_whitelist - collection_allow_list = get_backend_config().collection_allow_list - if collection_whitelist: - _log.warning("Using deprecated collection_whitelist configuration, consider using collection_allow_list.") - assert collection_allow_list is None - collection_allow_list = CollectionAllowList(collection_whitelist) - + # TODO: remove deprecated collection_whitelist usage + collection_allow_list = get_backend_config().collection_allow_list or get_backend_config().collection_whitelist if collection_allow_list: collection_allow_list = CollectionAllowList(collection_allow_list)