16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 07:49:19 +02:00

fix error reporting of python syntax errors

This commit is contained in:
milek7
2019-09-18 19:18:53 +02:00
parent c44c570509
commit a8b614cf6f
2 changed files with 5 additions and 3 deletions

View File

@@ -383,7 +383,8 @@ void python_taskqueue::run( GLFWwindow *Context, rendertask_sequence &Tasks, upl
std::lock_guard<std::mutex> lock(Upload_Tasks.mutex);
Upload_Tasks.data.push_back(task);
}
error();
if( PyErr_Occurred() != nullptr )
error();
}
// clear the thread state
PyEval_SaveThread();
@@ -415,8 +416,6 @@ void python_taskqueue::update()
void
python_taskqueue::error() {
if( PyErr_Occurred() == nullptr ) { return; }
if( m_stderr != nullptr ) {
// std err pythona jest buforowane
PyErr_Print();