Run get_python script when Python fails to load (#4482)

Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
Alex Peterson
2021-10-05 11:26:54 -07:00
committed by GitHub
parent bf7ae12402
commit df419a0990
13 changed files with 202 additions and 11 deletions
@@ -246,9 +246,11 @@ namespace O3DE::ProjectManager
if (Py_IsInitialized())
{
AZ_Warning("python", false, "Python is already active");
return false;
return m_pythonStarted;
}
m_pythonStarted = false;
// set PYTHON_HOME
AZStd::string pyBasePath = Platform::GetPythonHomePath(PY_PACKAGE, m_enginePath.c_str());
if (!AZ::IO::SystemFile::Exists(pyBasePath.c_str()))
@@ -304,7 +306,8 @@ namespace O3DE::ProjectManager
// make sure the engine is registered
RegisterThisEngine();
return !PyErr_Occurred();
m_pythonStarted = !PyErr_Occurred();
return m_pythonStarted;
}
catch ([[maybe_unused]] const std::exception& e)
{