aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Bush <ali_bush@gentoo.org>2009-12-25 22:31:06 +0000
committerAlistair Bush <ali_bush@gentoo.org>2009-12-25 22:31:06 +0000
commitcd6068a36873c437fde43ee962494d581f92ed2e (patch)
treeb6fc0d1edbf6711dd16949dcdf1ebacfc0f75f18
parentApply python3 patch 6 from Arfrever (diff)
downloadjava-config-cd6068a36873c437fde43ee962494d581f92ed2e.tar.gz
java-config-cd6068a36873c437fde43ee962494d581f92ed2e.tar.bz2
java-config-cd6068a36873c437fde43ee962494d581f92ed2e.zip
Apply python3 patch 7 from Arfrever. Trunk now broken until a few python3 issues are solved.
svn path=/projects/java-config-2/trunk/; revision=8042
-rwxr-xr-xsrc/depend-java-query1
-rwxr-xr-xsrc/gjl1
-rwxr-xr-xsrc/java-config-27
3 files changed, 6 insertions, 3 deletions
diff --git a/src/depend-java-query b/src/depend-java-query
index 8c76164..2df5b70 100755
--- a/src/depend-java-query
+++ b/src/depend-java-query
@@ -13,7 +13,6 @@ from java_config_2.VersionManager import *
import os
import sys
-from commands import getoutput
from optparse import OptionParser, make_option, OptionValueError
diff --git a/src/gjl b/src/gjl
index 30ee1ea..a0094d8 100755
--- a/src/gjl
+++ b/src/gjl
@@ -10,7 +10,6 @@ from java_config_2.OutputFormatter import *
from java_config_2.EnvironmentManager import *
from java_config_2.VersionManager import *
-from commands import getoutput
from optparse import OptionParser, make_option, OptionValueError
import os
from os.path import basename
diff --git a/src/java-config-2 b/src/java-config-2
index f2103f5..1372ec6 100755
--- a/src/java-config-2
+++ b/src/java-config-2
@@ -12,7 +12,12 @@ from java_config_2.Errors import *
import os
import sys
-from commands import getoutput
+try:
+ # Python 3.
+ from subprocess import getoutput
+except ImportError:
+ # Python 2.
+ from commands import getoutput
from optparse import OptionParser, make_option