mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't substitute ExecutionExeption with PyExecutionException
This commit is contained in:
@@ -502,15 +502,6 @@ public class PyPackageManagerImpl extends PyPackageManager {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
catch (RunCanceledByUserException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (PyExecutionException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
throw new PyExecutionException(e.getMessage(), helperPath, args, 0);
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new PyExecutionException(e.getMessage(), helperPath, args, 0);
|
||||
}
|
||||
|
||||
@@ -108,26 +108,21 @@ public class PyRemotePackageManagerImpl extends PyPackageManagerImpl {
|
||||
return quoteIfNeeded(input);
|
||||
}
|
||||
}));
|
||||
try {
|
||||
if (askForSudo) {
|
||||
askForSudo = !manager.ensureCanWrite(null, remoteSdkCredentials, remoteSdkCredentials.getInterpreterPath());
|
||||
}
|
||||
ProcessOutput processOutput;
|
||||
do {
|
||||
PathMappingSettings mappings = manager.setupMappings(null, (PyRemoteSdkAdditionalDataBase)sdkData, null);
|
||||
processOutput =
|
||||
manager.runRemoteProcess(null, remoteSdkCredentials, mappings, ArrayUtil.toStringArray(cmdline), workingDir, askForSudo);
|
||||
if (askForSudo && processOutput.getStderr().contains("sudo: 3 incorrect password attempts")) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
while (true);
|
||||
return processOutput;
|
||||
if (askForSudo) {
|
||||
askForSudo = !manager.ensureCanWrite(null, remoteSdkCredentials, remoteSdkCredentials.getInterpreterPath());
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
throw new PyExecutionException("Error running SDK: " + e.getMessage(), helperPath, args, 0);
|
||||
ProcessOutput processOutput;
|
||||
do {
|
||||
PathMappingSettings mappings = manager.setupMappings(null, (PyRemoteSdkAdditionalDataBase)sdkData, null);
|
||||
processOutput =
|
||||
manager.runRemoteProcess(null, remoteSdkCredentials, mappings, ArrayUtil.toStringArray(cmdline), workingDir, askForSudo);
|
||||
if (askForSudo && processOutput.getStderr().contains("sudo: 3 incorrect password attempts")) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
while (true);
|
||||
return processOutput;
|
||||
}
|
||||
else {
|
||||
throw new PyExecutionException(PythonRemoteInterpreterManager.WEB_DEPLOYMENT_PLUGIN_IS_DISABLED, helperPath, args, 0);
|
||||
|
||||
Reference in New Issue
Block a user