Python module: avoid exception for 'for doc in q' where q is empty
This commit is contained in:
parent
c93581201a
commit
fe66ad214a
@ -1075,7 +1075,7 @@ Query_iternext(PyObject *_self)
|
||||
}
|
||||
int cnt = self->query->getResCnt();
|
||||
if (cnt <= 0 || self->next < 0) {
|
||||
PyErr_SetString(PyExc_AttributeError, "query: no results");
|
||||
// This happens if there are no results and is not an error
|
||||
return 0;
|
||||
}
|
||||
recoll_DocObject *result =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user