public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ralph Sennhauser" <sera@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/java-config:master commit in: src/java_config_2/
Date: Sat, 28 Dec 2013 13:15:43 +0000 (UTC)	[thread overview]
Message-ID: <1388233680.a98d389c9bbc5f691938780c22557533fb885e8b.sera@gentoo> (raw)

commit:     a98d389c9bbc5f691938780c22557533fb885e8b
Author:     Ralph Sennhauser <sera <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 28 10:49:39 2013 +0000
Commit:     Ralph Sennhauser <sera <AT> gentoo <DOT> org>
CommitDate: Sat Dec 28 12:28:00 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/java-config.git;a=commit;h=a98d389c

Rename variable active to active_vm

Self-documenting code is good

---
 src/java_config_2/EnvironmentManager.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/java_config_2/EnvironmentManager.py b/src/java_config_2/EnvironmentManager.py
index ab83dd1..d573d64 100644
--- a/src/java_config_2/EnvironmentManager.py
+++ b/src/java_config_2/EnvironmentManager.py
@@ -24,7 +24,7 @@ class EnvironmentManager(object):
         self.virtuals = {}
         self.virtuals_pref = None
         self.virtual_machines = None
-        self.active = None
+        self.active_vm = None
 
         self.eprefix = eprefix
         self.eroot = root + eprefix
@@ -107,7 +107,7 @@ class EnvironmentManager(object):
         if vm_name:
             vm = self.get_vm(vm_name)
             if vm:
-                self.active = vm
+                self.active_vm = vm
                 return vm
 
         for link in self.vm_links():
@@ -115,17 +115,17 @@ class EnvironmentManager(object):
                 vm_name = basename(os.readlink(link))
                 vm = self.get_vm(vm_name)
                 if vm:
-                    self.active = vm
+                    self.active_vm = vm
                     return vm
         raise InvalidVMError("Unable to determine valid vm. Please see http://www.gentoo.org/doc/en/java.xml#doc_chap4")
 
     def set_active_vm(self, vm):
-        self.active = vm
+        self.active_vm = vm
  
     def get_active_vm(self):
-        if self.active is None:
+        if self.active_vm is None:
             self.load_active_vm()
-        return self.active
+        return self.active_vm
 
     def get_virtual_machines(self):
         if self.virtual_machines is None:


             reply	other threads:[~2013-12-28 13:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28 13:15 Ralph Sennhauser [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-16 20:50 [gentoo-commits] proj/java-config:master commit in: src/java_config_2/ Patrice Clement
2017-09-08 21:22 Patrice Clement
2013-12-28 13:15 Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2013-12-28 13:15 Ralph Sennhauser
2013-12-27 11:28 Ralph Sennhauser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388233680.a98d389c9bbc5f691938780c22557533fb885e8b.sera@gentoo \
    --to=sera@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox