}
}
-PyObject *handleEvent(ePtr<eServiceEvent> &ptr, PyObject *dest_list, char* argstring, int argcount, PyObject *service, PyObject *nowTime, PyObject *service_name, PyObject *convertFunc, PyObject *convertFuncArgs)
+int handleEvent(ePtr<eServiceEvent> &ptr, PyObject *dest_list, char* argstring, int argcount, PyObject *service, PyObject *nowTime, PyObject *service_name, PyObject *convertFunc, PyObject *convertFuncArgs)
{
if (convertFunc)
{
Py_DECREF(nowTime);
Py_DECREF(convertFuncArgs);
Py_DECREF(dest_list);
- return result;
+ PyErr_SetString(PyExc_StandardError,
+ "error in convertFunc execute");
+ eDebug("error in convertFunc execute");
+ return -1;
}
PyList_Append(dest_list, result);
Py_DECREF(result);
ePtr<eServiceEvent> ptr;
while (!getNextTimeEntry(ptr))
{
- PyObject *ret = handleEvent(ptr, dest_list, argstring, argcount, service, nowTime, service_name, convertFunc, convertFuncArgs);
- if (ret)
- return ret;
+ if (handleEvent(ptr, dest_list, argstring, argcount, service, nowTime, service_name, convertFunc, convertFuncArgs))
+ {
+ Unlock();
+ return 0; // error
+ }
}
}
Unlock();
else
lookupEventTime(ref, stime, ptr, type);
}
- PyObject *ret = handleEvent(ptr, dest_list, argstring, argcount, service, nowTime, service_name, convertFunc, convertFuncArgs);
- if (ret)
- return ret;
+ if (handleEvent(ptr, dest_list, argstring, argcount, service, nowTime, service_name, convertFunc, convertFuncArgs))
+ return 0; // error
}
if (service_changed)
Py_DECREF(service);