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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user