mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ZD-616235 Log errors of package_tool.py in PyPackageManagerImpl
This commit is contained in:
@@ -21,6 +21,7 @@ import com.intellij.codeInspection.ui.ListEditForm;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
@@ -54,6 +55,8 @@ import java.util.*;
|
||||
* @author vlan
|
||||
*/
|
||||
public class PyPackageRequirementsInspection extends PyInspection {
|
||||
private static final Logger LOG = Logger.getInstance(PyPackageRequirementsInspection.class);
|
||||
|
||||
public JDOMExternalizableStringList ignoredPackages = new JDOMExternalizableStringList();
|
||||
|
||||
@NotNull
|
||||
@@ -250,6 +253,7 @@ public class PyPackageRequirementsInspection extends PyInspection {
|
||||
packages = manager.getPackages(PySdkUtil.isRemote(sdk));
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
LOG.error(e);
|
||||
return null;
|
||||
}
|
||||
if (packages == null) return null;
|
||||
|
||||
@@ -467,7 +467,7 @@ public class PyPackageManagerImpl extends PyPackageManager {
|
||||
throw new PyExecutionException("Timed out", path, args, output);
|
||||
}
|
||||
else if (exitCode != 0) {
|
||||
throw new PyExecutionException("Non-zero exit code", path, args, output);
|
||||
throw new PyExecutionException("Non-zero exit code (" + exitCode + ")", path, args, output);
|
||||
}
|
||||
return output.getStdout();
|
||||
}
|
||||
@@ -536,7 +536,7 @@ public class PyPackageManagerImpl extends PyPackageManager {
|
||||
final int exitCode = result.getExitCode();
|
||||
if (exitCode != 0) {
|
||||
final String message = StringUtil.isEmptyOrSpaces(result.getStdout()) && StringUtil.isEmptyOrSpaces(result.getStderr()) ?
|
||||
"Permission denied" : "Non-zero exit code";
|
||||
"Permission denied" : "Non-zero exit code (" + exitCode + ")";
|
||||
throw new PyExecutionException(message, helperPath, args, result);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user