aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Bush <ali_bush@gentoo.org>2008-01-21 05:58:25 +0000
committerAlistair Bush <ali_bush@gentoo.org>2008-01-21 05:58:25 +0000
commit5473d658a4c4434c30136fdb056c4ddc29e88165 (patch)
tree425952c4ce2726c011d8c256db4e005018c19b58 /src/java_config_2/EnvironmentManager.py
parentRevert this back, didn't mean to commit it. (diff)
downloadjava-config-5473d658a4c4434c30136fdb056c4ddc29e88165.tar.gz
java-config-5473d658a4c4434c30136fdb056c4ddc29e88165.tar.bz2
java-config-5473d658a4c4434c30136fdb056c4ddc29e88165.zip
Fix message, clean up comments
svn path=/projects/java-config-2/trunk/; revision=5944
Diffstat (limited to 'src/java_config_2/EnvironmentManager.py')
-rw-r--r--src/java_config_2/EnvironmentManager.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/java_config_2/EnvironmentManager.py b/src/java_config_2/EnvironmentManager.py
index b7d4050..9e76a50 100644
--- a/src/java_config_2/EnvironmentManager.py
+++ b/src/java_config_2/EnvironmentManager.py
@@ -442,17 +442,22 @@ class EnvironmentManager(object):
def have_provider(self, virtuals, virtualMachine, versionManager):
result=True
- for virtualKey in virtuals.split():
- if self.get_package(virtualKey):
- try:
- self.get_package(virtualKey).get_provider().classpath()
- result= (result and True)
- continue
- except AttributeError:
- if not self.get_package(virtualKey).get_available_vms().count(virtualMachine.name()) > 0:
- result = False
- else:
- result=result & True
+ storeVM = self.get_active_vm()
+ self.set_active_vm(virtualMachine)
+ try:
+ for virtualKey in virtuals.split():
+ if self.get_package(virtualKey):
+ try:
+ self.get_package(virtualKey).get_provider().classpath()
+ result= (result and True)
+ continue
+ except AttributeError:
+ if not self.get_package(virtualKey).get_available_vms().count(virtualMachine.name()) > 0:
+ result = False
+ else:
+ result=result and True
+ finally:
+ self.set_active_vm(storeVM)
return result
# Singleton hack