Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Chuck Daniels <[email protected]>
  • Loading branch information
jhkennedy and chuckwondo committed Oct 16, 2024
1 parent d5c0346 commit 544b4d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

### Fixed


- Integration tests no longer clobber existing `.netrc` file
([#806](https://github.com/nsidc/earthaccess/issues/806))
(@chuckwondo)
- Return an empty list instead of raising an `IndexError` when searches find no results.
([#839](https://github.com/nsidc/earthaccess/pull/839))
([#526](https://github.com/nsidc/earthaccess/issues/526))
([@jhkennedy](https://github.com/jhkennedy))

## [0.11.0] 2024-10-01
Expand Down
3 changes: 1 addition & 2 deletions earthaccess/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,7 @@ def get(self, limit: int = 2000) -> List[DataGranule]:
RuntimeError: The CMR query failed.
"""
response = get_results(self.session, self, limit)
if response:
cloud = self._is_cloud_hosted(response[0])
cloud = response and self._is_cloud_hosted(response[0])

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

Expand Down

0 comments on commit 544b4d0

Please sign in to comment.