python: makedocabstract failure should not cause exception
This commit is contained in:
parent
9b172b731c
commit
2b81076348
@ -1248,11 +1248,9 @@ Query_makedocabstract(recoll_QueryObject* self, PyObject *args,PyObject *kwargs)
|
|||||||
}
|
}
|
||||||
string abstract;
|
string abstract;
|
||||||
if (hlmethods == 0) {
|
if (hlmethods == 0) {
|
||||||
if (!self->query->makeDocAbstract(*(pydoc->doc), abstract)) {
|
// makeDocAbstract() can fail if there are no query terms (e.g. for
|
||||||
PyErr_SetString(PyExc_EnvironmentError,
|
// a query like [ext:odt]. This should not cause an exception
|
||||||
"rcl makeDocAbstract failed");
|
self->query->makeDocAbstract(*(pydoc->doc), abstract);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
HighlightData hldata;
|
HighlightData hldata;
|
||||||
sd->getTerms(hldata);
|
sd->getTerms(hldata);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user