|
a/src/python/recoll/pyrecoll.cpp |
|
b/src/python/recoll/pyrecoll.cpp |
|
... |
|
... |
1246 |
PyErr_SetString(PyExc_ValueError, "Query not initialized");
|
1246 |
PyErr_SetString(PyExc_ValueError, "Query not initialized");
|
1247 |
return 0;
|
1247 |
return 0;
|
1248 |
}
|
1248 |
}
|
1249 |
string abstract;
|
1249 |
string abstract;
|
1250 |
if (hlmethods == 0) {
|
1250 |
if (hlmethods == 0) {
|
|
|
1251 |
// makeDocAbstract() can fail if there are no query terms (e.g. for
|
|
|
1252 |
// a query like [ext:odt]. This should not cause an exception
|
1251 |
if (!self->query->makeDocAbstract(*(pydoc->doc), abstract)) {
|
1253 |
self->query->makeDocAbstract(*(pydoc->doc), abstract);
|
1252 |
PyErr_SetString(PyExc_EnvironmentError,
|
|
|
1253 |
"rcl makeDocAbstract failed");
|
|
|
1254 |
return 0;
|
|
|
1255 |
}
|
|
|
1256 |
} else {
|
1254 |
} else {
|
1257 |
HighlightData hldata;
|
1255 |
HighlightData hldata;
|
1258 |
sd->getTerms(hldata);
|
1256 |
sd->getTerms(hldata);
|
1259 |
PyPlainToRich hler(hlmethods);
|
1257 |
PyPlainToRich hler(hlmethods);
|
1260 |
hler.set_inputhtml(0);
|
1258 |
hler.set_inputhtml(0);
|