summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ee1b9e)
raw | patch | inline | side by side (parent: 7ee1b9e)
author | Sven Trenkel <collectd@semidefinite.de> | |
Sat, 7 Nov 2009 19:54:08 +0000 (20:54 +0100) | ||
committer | Sven Trenkel <collectd@semidefinite.de> | |
Sat, 7 Nov 2009 19:54:08 +0000 (20:54 +0100) |
src/python.c | patch | blob | history |
diff --git a/src/python.c b/src/python.c
index 72c4ab613bcf859e46376dfdad1ca767254081b5..3d2d3a8221f361e6b39d0041157f7d1697953691 100644 (file)
--- a/src/python.c
+++ b/src/python.c
@@ -129,7 +129,10 @@ static int cpy_write_callback(const data_set_t *ds, const value_list_t *value_li
value_list->plugin_instance, value_list->type_instance, value_list->plugin,
value_list->host, (double) value_list->time, value_list->interval);
Py_DECREF(list);
- ret = PyObject_CallFunctionObjArgs(c->callback, v, (void *) 0);
+ if (c->data == NULL)
+ ret = PyObject_CallFunctionObjArgs(c->callback, v, (void *) 0);
+ else
+ ret = PyObject_CallFunctionObjArgs(c->callback, v, c->data, (void *) 0);
if (ret == NULL) {
/* FIXME */
PyErr_Print();