Skip to content

Commit

Permalink
Only check if results are cloud hosted when there are results
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Oct 3, 2024
1 parent 87d99e0 commit c17e7ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions earthaccess/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ def get(self, limit: int = 2000) -> List[DataGranule]:
RuntimeError: The CMR query failed.
"""
response = get_results(self.session, self, limit)

cloud = self._is_cloud_hosted(response[0])
if response:
cloud = self._is_cloud_hosted(response[0])

return [DataGranule(granule, cloud_hosted=cloud) for granule in response]

Expand Down

0 comments on commit c17e7ec

Please sign in to comment.