X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fpython.c;h=8b378a299994105f9a7584e0e247d7a2710e2558;hb=81a5fd5046c6a39f580a8fc1a3af837fd5f5aa5c;hp=928c921bbf6274db71efe69ff9874583e9f52c70;hpb=920d5eaaa68c8e1184fa7066f8e962c3b4e384db;p=collectd.git diff --git a/src/python.c b/src/python.c index 928c921b..8b378a29 100644 --- a/src/python.c +++ b/src/python.c @@ -1038,7 +1038,7 @@ static int cpy_init_python() { PyObject *module; #ifdef IS_PY3K - wchar_t *argv = {0}; + wchar_t *argv = L""; /* Add a builtin module, before Py_Initialize */ PyImport_AppendInittab("collectd", PyInit_collectd); #else @@ -1159,8 +1159,8 @@ static int cpy_config(oconfig_item_t *ci) { cpy_log_exception("python initialization"); continue; } - if (PyList_Append(sys_path, dir_object) != 0) { - ERROR("python plugin: Unable to append \"%s\" to " + if (PyList_Insert(sys_path, 0, dir_object) != 0) { + ERROR("python plugin: Unable to prepend \"%s\" to " "python module path.", dir); cpy_log_exception("python initialization"); }