finally fix satfinder with new config
[enigma2.git] / lib / python / python.cpp
index 4ca77ab2f6bf88825d5f62a79b2e5463646bf885..119bff1c0bdd006c61c1a98755f0f7227dde9938 100644 (file)
@@ -6,6 +6,7 @@
 #include <Python.h>
 
 extern "C" void init_enigma();
+extern void bsodFatal();
 
 DEFINE_REF(TestObj);
 
@@ -61,6 +62,8 @@ ePython::ePython()
 {
 //     Py_VerboseFlag = 1;
        
+//     Py_OptimizeFlag = 1;
+       
        Py_Initialize();
        
        init_enigma();
@@ -74,9 +77,8 @@ ePython::~ePython()
 int ePython::execute(const std::string &pythonfile, const std::string &funcname)
 {
        PyObject *pName, *pModule, *pDict, *pFunc, *pArgs, *pValue;
-       
        pName = PyString_FromString(pythonfile.c_str());
-       
+
        pModule = PyImport_Import(pName);
        Py_DECREF(pName);
        
@@ -129,6 +131,7 @@ int ePython::call(PyObject *pFunc, PyObject *pArgs)
                } else
                {
                        PyErr_Print();
+                       bsodFatal();
                }
        }
        return res;