summaryrefslogtreecommitdiff
path: root/python/src/com/jetbrains/python/sdk/PythonSdkType.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-08-20 17:01:23 -0700
committerTor Norbye <tnorbye@google.com>2014-08-20 17:01:23 -0700
commit1aa2e09bdbd413eacb677e9fa4b50630530d0656 (patch)
tree2f4cc6d69645bd460aa253fdecb606d764fbd25d /python/src/com/jetbrains/python/sdk/PythonSdkType.java
parent02cf98d65c798d368fcec43ed64a001d513bdd4f (diff)
downloadidea-1aa2e09bdbd413eacb677e9fa4b50630530d0656.tar.gz
Snapshot idea/138.1696 from git://git.jetbrains.org/idea/community.git
Change-Id: I50c97b83a815ce635e49a38380ba5b8765e4b16a
Diffstat (limited to 'python/src/com/jetbrains/python/sdk/PythonSdkType.java')
-rw-r--r--python/src/com/jetbrains/python/sdk/PythonSdkType.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkType.java b/python/src/com/jetbrains/python/sdk/PythonSdkType.java
index f194f359e1a9..58de09370d37 100644
--- a/python/src/com/jetbrains/python/sdk/PythonSdkType.java
+++ b/python/src/com/jetbrains/python/sdk/PythonSdkType.java
@@ -910,6 +910,16 @@ public class PythonSdkType extends SdkType {
return null;
}
+ @Nullable
+ public static Sdk findPython2Sdk(List<Sdk> sdks) {
+ Collections.sort(sdks, PreferredSdkComparator.INSTANCE);
+ for (Sdk sdk : sdks) {
+ if (!getLanguageLevelForSdk(sdk).isPy3K()) {
+ return sdk;
+ }
+ }
+ return null;
+ }
@Nullable
public static Sdk findLocalCPython(@Nullable Module module) {
@@ -997,7 +1007,7 @@ public class PythonSdkType extends SdkType {
public static boolean isIncompleteRemote(Sdk sdk) {
if (PySdkUtil.isRemote(sdk)) {
//noinspection ConstantConditions
- if (!((PyRemoteSdkAdditionalDataBase)sdk.getSdkAdditionalData()).isInitialized()) {
+ if (!((PyRemoteSdkAdditionalDataBase)sdk.getSdkAdditionalData()).isValid()) {
return true;
}
}