Skip to content

Commit adbd441

Browse files
author
zeloff
committed
fix find_all condition
1 parent b6b8851 commit adbd441

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "vulners"
3-
version = "2.3.6"
3+
version = "2.3.7"
44
description = "Python library and command-line utility for Vulners (https://vulners.com)"
55
readme = "README.md"
66
authors = ["Vulners Team"]

vulners/vulners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def find_all(self, query, limit=20, offset=0, fields=default_fields):
9595
end = offset + limit
9696
batch_size = min(1000, limit)
9797
result = ResultSet()
98-
while len(result) < limit:
98+
while limit > len(result) != result.total:
9999
chunk = self.__search(query, offset, min(batch_size, end - offset), fields)
100100
data = chunk["search"]
101101
result += [e["_source"] for e in data]

0 commit comments

Comments
 (0)