aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_python.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin_python.c')
-rw-r--r--plugin_python.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugin_python.c b/plugin_python.c
index 0a4a1fd..70ea9dc 100644
--- a/plugin_python.c
+++ b/plugin_python.c
@@ -1,5 +1,5 @@
-/* $Id: plugin_python.c 728 2007-01-14 11:14:38Z michael $
- * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/plugin_python.c $
+/* $Id: plugin_python.c 1086 2010-01-19 14:26:33Z mzuther $
+ * $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/plugin_python.c $
*
* Python plugin
*
@@ -32,6 +32,7 @@
*
*/
+#include "config.h"
#include <Python.h>
#include "debug.h"
#include "plugin.h"
@@ -92,6 +93,8 @@ static void pyt_exec_str(RESULT * result, const char *module, const char *functi
} else {
Py_DECREF(pModule);
error("Python call failed (\"%s.%s\")", module, function);
+ /* print traceback on stderr */
+ PyErr_PrintEx(0);
SetResult(&result, R_STRING, "");
return;
}
@@ -102,6 +105,8 @@ static void pyt_exec_str(RESULT * result, const char *module, const char *functi
Py_DECREF(pModule);
} else {
error("Failed to load python module \"%s\"", module);
+ /* print traceback on stderr */
+ PyErr_PrintEx(0);
}
SetResult(&result, R_STRING, "");
return;