|
a/src/python/recoll/pyrecoll.cpp |
|
b/src/python/recoll/pyrecoll.cpp |
|
... |
|
... |
516 |
} else {
|
516 |
} else {
|
517 |
PyErr_SetString(PyExc_AttributeError, "name not unicode nor string??");
|
517 |
PyErr_SetString(PyExc_AttributeError, "name not unicode nor string??");
|
518 |
Py_RETURN_NONE;
|
518 |
Py_RETURN_NONE;
|
519 |
}
|
519 |
}
|
520 |
|
520 |
|
521 |
key = rclconfig->fieldCanon(string(name));
|
521 |
key = rclconfig->fieldQCanon(string(name));
|
522 |
|
522 |
|
523 |
switch (key.at(0)) {
|
523 |
switch (key.at(0)) {
|
524 |
case 'u':
|
524 |
case 'u':
|
525 |
if (!key.compare(Rcl::Doc::keyurl)) {
|
525 |
if (!key.compare(Rcl::Doc::keyurl)) {
|
526 |
value = self->doc->url; found = true;
|
526 |
value = self->doc->url; found = true;
|
|
... |
|
... |
638 |
PyErr_SetString(PyExc_AttributeError, "value??");
|
638 |
PyErr_SetString(PyExc_AttributeError, "value??");
|
639 |
return -1;
|
639 |
return -1;
|
640 |
}
|
640 |
}
|
641 |
char* uvalue = PyBytes_AsString(putf8);
|
641 |
char* uvalue = PyBytes_AsString(putf8);
|
642 |
Py_DECREF(putf8);
|
642 |
Py_DECREF(putf8);
|
643 |
string key = rclconfig->fieldCanon(string(name));
|
643 |
string key = rclconfig->fieldQCanon(string(name));
|
644 |
|
644 |
|
645 |
LOGDEB0(("Doc_setattr: [%s] (%s) -> [%s]\n", key.c_str(), name, uvalue));
|
645 |
LOGDEB0(("Doc_setattr: [%s] (%s) -> [%s]\n", key.c_str(), name, uvalue));
|
646 |
// We set the value in the meta array in all cases. Good idea ? or do it
|
646 |
// We set the value in the meta array in all cases. Good idea ? or do it
|
647 |
// only for fields without a dedicated Doc:: entry?
|
647 |
// only for fields without a dedicated Doc:: entry?
|
648 |
self->doc->meta[key] = uvalue;
|
648 |
self->doc->meta[key] = uvalue;
|