forked from mirrors/kore
Make sure koreapp.onmsg can log errors from Python.
This commit is contained in:
parent
d10ee4438d
commit
cb0f5a4137
|
@ -2285,7 +2285,7 @@ python_kore_recvobj(struct kore_msg *msg, const void *data)
|
|||
|
||||
if ((bytes = PyBytes_FromStringAndSize(data, msg->length)) == NULL) {
|
||||
Py_DECREF(onmsg);
|
||||
kore_python_log_error("kore.recvobj");
|
||||
kore_python_log_error("koreapp.onmsg");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2294,11 +2294,12 @@ python_kore_recvobj(struct kore_msg *msg, const void *data)
|
|||
|
||||
if (obj == NULL) {
|
||||
Py_DECREF(onmsg);
|
||||
kore_python_log_error("kore.recvobj");
|
||||
kore_python_log_error("koreapp.onmsg");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = PyObject_CallFunctionObjArgs(onmsg, obj, NULL);
|
||||
kore_python_log_error("koreapp.onmsg");
|
||||
|
||||
Py_DECREF(obj);
|
||||
Py_DECREF(onmsg);
|
||||
|
|
Loading…
Reference in New Issue