summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30cfed8)
raw | patch | inline | side by side (parent: 30cfed8)
author | Patrick Browne <patrick.browne@amadeus.com> | |
Tue, 30 Sep 2014 08:31:05 +0000 (10:31 +0200) | ||
committer | Patrick Browne <patrick.browne@amadeus.com> | |
Tue, 30 Sep 2014 08:32:07 +0000 (10:32 +0200) |
When importing a module, you expect the plugin repertory to have higher priority
than your site-packages. It will prevent hard to debug clashing module names problems.
At least, if there is a problem, it will fail more loudly than "module did not register
any config callback"
than your site-packages. It will prevent hard to debug clashing module names problems.
At least, if there is a problem, it will fail more loudly than "module did not register
any config callback"
src/python.c | patch | blob | history |
diff --git a/src/python.c b/src/python.c
index 10ac8f0d149f815fa9d00e54bdda3e0123246029..81724c073a701014bf070fe1467f55b44f300e87 100644 (file)
--- a/src/python.c
+++ b/src/python.c
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");
}