Gentoo Archives: gentoo-commits

From: Ralph Sennhauser <sera@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/java-config:master commit in: src/java_config_2/
Date: Sat, 28 Dec 2013 13:15:49
Message-Id: 1388233680.a98d389c9bbc5f691938780c22557533fb885e8b.sera@gentoo
1 commit: a98d389c9bbc5f691938780c22557533fb885e8b
2 Author: Ralph Sennhauser <sera <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 28 10:49:39 2013 +0000
4 Commit: Ralph Sennhauser <sera <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 28 12:28:00 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/java-config.git;a=commit;h=a98d389c
7
8 Rename variable active to active_vm
9
10 Self-documenting code is good
11
12 ---
13 src/java_config_2/EnvironmentManager.py | 12 ++++++------
14 1 file changed, 6 insertions(+), 6 deletions(-)
15
16 diff --git a/src/java_config_2/EnvironmentManager.py b/src/java_config_2/EnvironmentManager.py
17 index ab83dd1..d573d64 100644
18 --- a/src/java_config_2/EnvironmentManager.py
19 +++ b/src/java_config_2/EnvironmentManager.py
20 @@ -24,7 +24,7 @@ class EnvironmentManager(object):
21 self.virtuals = {}
22 self.virtuals_pref = None
23 self.virtual_machines = None
24 - self.active = None
25 + self.active_vm = None
26
27 self.eprefix = eprefix
28 self.eroot = root + eprefix
29 @@ -107,7 +107,7 @@ class EnvironmentManager(object):
30 if vm_name:
31 vm = self.get_vm(vm_name)
32 if vm:
33 - self.active = vm
34 + self.active_vm = vm
35 return vm
36
37 for link in self.vm_links():
38 @@ -115,17 +115,17 @@ class EnvironmentManager(object):
39 vm_name = basename(os.readlink(link))
40 vm = self.get_vm(vm_name)
41 if vm:
42 - self.active = vm
43 + self.active_vm = vm
44 return vm
45 raise InvalidVMError("Unable to determine valid vm. Please see http://www.gentoo.org/doc/en/java.xml#doc_chap4")
46
47 def set_active_vm(self, vm):
48 - self.active = vm
49 + self.active_vm = vm
50
51 def get_active_vm(self):
52 - if self.active is None:
53 + if self.active_vm is None:
54 self.load_active_vm()
55 - return self.active
56 + return self.active_vm
57
58 def get_virtual_machines(self):
59 if self.virtual_machines is None: