Code

Merge pull request #774 from trenkel/master
[collectd.git] / src / python.c
index af2dc5b69d2f84b8dc83e5895fb126078470b652..0fad6fa59a690a201d54d3a95fe33a3b29248222 100644 (file)
@@ -1153,8 +1153,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");
                        }