Skip to content

Commit

Permalink
Update poetry lockfile (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau authored Dec 6, 2023
1 parent 17beff1 commit a465230
Show file tree
Hide file tree
Showing 2 changed files with 1,714 additions and 1,398 deletions.
15 changes: 12 additions & 3 deletions earthaccess/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ def get(self, limit: int = 2000) -> list:
try:
response.raise_for_status()
except exceptions.HTTPError as ex:
raise RuntimeError(ex.response.text)
if ex.response is not None:
raise RuntimeError(ex.response.text) from ex
else:
raise RuntimeError(str(ex)) from ex

if self._format == "json":
latest = response.json()["feed"]["entry"]
Expand Down Expand Up @@ -333,7 +336,10 @@ def hits(self) -> int:
try:
response.raise_for_status()
except exceptions.HTTPError as ex:
raise RuntimeError(ex.response.text)
if ex.response is not None:
raise RuntimeError(ex.response.text) from ex
else:
raise RuntimeError(str(ex)) from ex

return int(response.headers["CMR-Hits"])

Expand Down Expand Up @@ -561,7 +567,10 @@ def get(self, limit: int = 2000) -> list:
try:
response.raise_for_status()
except exceptions.HTTPError as ex:
raise RuntimeError(ex.response.text)
if ex.response is not None:
raise RuntimeError(ex.response.text) from ex
else:
raise RuntimeError(str(ex)) from ex

if self._format == "json":
latest = response.json()["feed"]["entry"]
Expand Down
Loading

0 comments on commit a465230

Please sign in to comment.