@SuppressWarnings("unchecked")
private Tuple<List<ProjectConfigError>, IInterpreterInfo> getConfigErrorsAndInfo(IProject project) {
if (project == null || !project.isOpen()) {
return new Tuple<List<ProjectConfigError>, IInterpreterInfo>(new ArrayList(), null);
}
PythonNature nature = PythonNature.getPythonNature(project);
if (nature == null) {
return new Tuple<List<ProjectConfigError>, IInterpreterInfo>(new ArrayList(), null);
}
//If the info is not readily available, we try to get some more times... after that, if still not available,
//we just return as if it's all OK.
Tuple<List<ProjectConfigError>, IInterpreterInfo> configErrorsAndInfo = null;
boolean goodToGo = false;
for (int i = 0; i < 10 && !goodToGo; i++) {
try {
configErrorsAndInfo = nature.getConfigErrorsAndInfo(project);
goodToGo = true;
} catch (PythonNatureWithoutProjectException e1) {
goodToGo = false;
synchronized (this) {
try {