Re #8686. Added check for PyErr_SystemExit for builds.
Merge branch 'feature/8686_mantidplot_returns' into develop