X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpython.c;h=81724c073a701014bf070fe1467f55b44f300e87;hb=0c380c5309b9d25a739707cbad80a69f755ff8d5;hp=0fb49d4caa95b737f90afb8ff08cedfbc3282003;hpb=7a6887ad7eef33e04bcb0720c213d05fd9be8a59;p=collectd.git diff --git a/src/python.c b/src/python.c index 0fb49d4c..81724c07 100644 --- a/src/python.c +++ b/src/python.c @@ -933,7 +933,7 @@ static int cpy_init(void) { pthread_sigmask(SIG_BLOCK, &sigset, NULL); state = PyEval_SaveThread(); if (do_interactive) { - if (pthread_create(&thread, NULL, cpy_interactive, NULL)) { + if (plugin_thread_create(&thread, NULL, cpy_interactive, NULL)) { ERROR("python: Error creating thread for interactive interpreter."); } } @@ -1103,8 +1103,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"); }