Skip to content

Commit

Permalink
Update earthaccess/search.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jhkennedy authored Oct 4, 2024
1 parent c618632 commit fa61d1b
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 fa61d1b

Please sign in to comment.