Skip to content

Commit

Permalink
Change: Stop requesting more results than available
Browse files Browse the repository at this point in the history
  • Loading branch information
n-thumann committed Dec 10, 2024
1 parent ddf29b9 commit b4b06f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pontos/nvd/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ async def _load_next_data(self) -> None:
):
raise NoMoreResults()

if (
self._total_results is not None
and self._current_index >= self._total_results
):
raise NoMoreResults()

params = self._params
params["startIndex"] = self._current_index

Expand Down

0 comments on commit b4b06f3

Please sign in to comment.