From b8c470cf1fd579a48670a83c903bca5e410cddd9 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Fri, 4 Oct 2024 05:48:05 -0800 Subject: [PATCH] Update earthaccess/search.py --- earthaccess/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earthaccess/search.py b/earthaccess/search.py index f2913b23..3a2b458d 100644 --- a/earthaccess/search.py +++ b/earthaccess/search.py @@ -468,7 +468,7 @@ def get(self, limit: int = 2000) -> List[DataGranule]: RuntimeError: The CMR query failed. """ response = get_results(self.session, self, limit) - cloud = response and self._is_cloud_hosted(response[0]) + cloud = len(response) > 0 and self._is_cloud_hosted(response[0]) return [DataGranule(granule, cloud_hosted=cloud) for granule in response]