Skip to content

Commit

Permalink
Re #8686. Fixing bug found in testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Jan 9, 2014
1 parent 51a191c commit edc5a77
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Code/Mantid/MantidPlot/src/PythonScript.cpp
Expand Up @@ -63,6 +63,10 @@ namespace
return retcode;
}

/// Message to emit when everything worked out fine
static const QString MSG_FINISHED = "Script execution finished.";
/// Message to emit when starting
static const QString MSG_STARTED = "Script execution started.";
}


Expand Down Expand Up @@ -260,6 +264,7 @@ void PythonScript::emit_error()
Py_XDECREF(traceback);
Py_XDECREF(exception);
Py_XDECREF(value);
emit finished(MSG_FINISHED);
return;
}
}
Expand Down Expand Up @@ -596,7 +601,7 @@ bool PythonScript::executeImpl()
/// Performs the call to Python
bool PythonScript::executeString()
{
emit started("Script execution started.");
emit started(MSG_STARTED);
bool success(false);
GlobalInterpreterLock gil;

Expand All @@ -615,8 +620,7 @@ bool PythonScript::executeString()
}
else
{
QString msg = "Script execution finished.";
emit finished(msg);
emit finished(MSG_FINISHED);
success = true;
}
if(isInteractive())
Expand Down

0 comments on commit edc5a77

Please sign in to comment.