Make remove_invalid_o3de_projects take a path and return a value

Signed-off-by: pconroy <pconroy@amazon.com>
This commit is contained in:
pconroy
2021-07-01 13:22:44 -07:00
parent e0c3d15d5a
commit ae6a424064
6 changed files with 24 additions and 11 deletions
@@ -755,13 +755,19 @@ namespace O3DE::ProjectManager
});
}
void PythonBindings::RemoveInvalidProjects()
bool PythonBindings::RemoveInvalidProjects()
{
ExecuteWithLockErrorHandling(
bool removalResult = false;
bool result = ExecuteWithLock(
[&]
{
m_register.attr("remove_invalid_o3de_projects")();
auto pythonRemovalResult = m_register.attr("remove_invalid_o3de_projects")();
// Returns an exit code so boolify it then invert result
removalResult = !pythonRemovalResult.cast<bool>();
});
return result && removalResult;
}
AZ::Outcome<void, AZStd::string> PythonBindings::UpdateProject(const ProjectInfo& projectInfo)