summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3533f8)
raw | patch | inline | side by side (parent: c3533f8)
author | Sven Trenkel <collectd@semidefinite.de> | |
Mon, 3 May 2010 13:01:56 +0000 (15:01 +0200) | ||
committer | Sven Trenkel <collectd@semidefinite.de> | |
Mon, 3 May 2010 13:01:56 +0000 (15:01 +0200) |
src/python.c | patch | blob | history |
diff --git a/src/python.c b/src/python.c
index d750d95b503e7fbbff9e78c375eeef3e809e79be..7a92b4853422f1e3788c45abc0fb6f2a50289e6e 100644 (file)
--- a/src/python.c
+++ b/src/python.c
static pthread_t thread;
sigset_t sigset;
+ if (!Py_IsInitialized()) {
+ WARNING("python: Plugin loaded but not configured.");
+ plugin_unregister_shutdown("python");
+ return 0;
+ }
PyEval_InitThreads();
/* Now it's finally OK to use python threads. */
for (c = cpy_init_callbacks; c; c = c->next) {