diff --git a/src/python/recoll/pyrecoll.cpp b/src/python/recoll/pyrecoll.cpp index a47bbfab..288340d1 100644 --- a/src/python/recoll/pyrecoll.cpp +++ b/src/python/recoll/pyrecoll.cpp @@ -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 =