Skip to content

Commit 84c17bd

Browse files
committed
Replaced deprecated StopIteration by simple return
Compliance to PEP 479.
1 parent 471706a commit 84c17bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

haystack/query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def _manual_iter(self):
147147
current_position += 1
148148

149149
if self._cache_is_full():
150-
raise StopIteration
150+
return
151151

152152
# We've run out of results and haven't hit our limit.
153153
# Fill more of the cache.
154154
if not self._fill_cache(current_position, current_position + ITERATOR_LOAD_PER_QUERY):
155-
raise StopIteration
155+
return
156156

157157
def post_process_results(self, results):
158158
to_cache = []

0 commit comments

Comments
 (0)