Commit bef14c55 authored by Clinton Stimpson's avatar Clinton Stimpson
Browse files

BUG: better fix for sigint handler.

parent bd00d32a
...@@ -347,11 +347,15 @@ pqPythonEventSource::pqPythonEventSource(QObject* p) ...@@ -347,11 +347,15 @@ pqPythonEventSource::pqPythonEventSource(QObject* p)
: pqThreadedEventSource(p) : pqThreadedEventSource(p)
{ {
this->Internal = new pqInternal; this->Internal = new pqInternal;
// initialize python int initPy = Py_IsInitialized();
Py_Initialize(); if(!initPy)
{
// initialize python
Py_Initialize();
#ifdef SIGINT #ifdef SIGINT
signal(SIGINT, SIG_DFL); signal(SIGINT, SIG_DFL);
#endif #endif
}
PyEval_InitThreads(); PyEval_InitThreads();
// add QtTesting to python's inittab, so it is // add QtTesting to python's inittab, so it is
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment