Skip to content

Commit

Permalink
Update earthaccess/search.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy committed Oct 16, 2024
1 parent 544b4d0 commit b8c470c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion earthaccess/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit b8c470c

Please sign in to comment.