public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Vikraman Choudhury" <vikraman.choudhury@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoostats:master commit in: client/bin/, client/
Date: Sun,  1 May 2011 09:51:04 +0000 (UTC)	[thread overview]
Message-ID: <40c723a7581cda09900368747bc705614c7a90eb.vikraman@gentoo> (raw)

commit:     40c723a7581cda09900368747bc705614c7a90eb
Author:     Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
AuthorDate: Sun May  1 09:50:22 2011 +0000
Commit:     Vikraman Choudhury <vikraman.choudhury <AT> gmail <DOT> com>
CommitDate: Sun May  1 09:50:22 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoostats.git;a=commit;h=40c723a7

fixed code style

---
 client/bin/client     |   24 ++++++++++++------------
 client/environment.py |   18 +++++++++---------
 client/packages.py    |   10 +++++-----
 client/useflags.py    |    8 ++++----
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/client/bin/client b/client/bin/client
index 26edcb4..7d649d1 100755
--- a/client/bin/client
+++ b/client/bin/client
@@ -4,20 +4,20 @@ from packages import Packages
 from useflags import UseFlags
 from environment import Environment
 
-def main ():
-  p = Packages ()
-  u = UseFlags ()
-  for cpv in p.getInstalledCPVs ():
+def main():
+  p = Packages()
+  u = UseFlags()
+  for cpv in p.getInstalledCPVs():
     print cpv,
-    for x in u.getUseFlags (cpv):
+    for x in u.getUseFlags(cpv):
       print x,
     print
-  e = Environment ()
-  print e.getVar ('CFLAGS')
-  print e.getVar ('CXXFLAGS')
-  print e.getVar ('LDFLAGS')
-  print e.getVar ('CHOST')
-  print e.getVar ('FEATURES')
+  e = Environment()
+  print e.getVar('CFLAGS')
+  print e.getVar('CXXFLAGS')
+  print e.getVar('LDFLAGS')
+  print e.getVar('CHOST')
+  print e.getVar('FEATURES')
 
 if __name__ == "__main__":
-  main ()
+  main()

diff --git a/client/environment.py b/client/environment.py
index 5300bef..074c2d1 100644
--- a/client/environment.py
+++ b/client/environment.py
@@ -1,19 +1,19 @@
 
 import logging
-from subprocess import *
+import subprocess
 
-class Environment:
+class Environment(object):
 
-  def __init__ (self):
+  def __init__(self):
     try:
-      p = Popen (['emerge', '--info'], stdout=PIPE)
-      self.out = p.stdout.readlines ()
+      p = subprocess.Popen(['emerge', '--info'], stdout=subprocess.PIPE)
+      self.out = p.stdout.readlines()
     except OSError, e:
-      fatal ('Cannot run emerge --info')
+      fatal('Cannot run emerge --info')
       raise e
 
-  def getVar (self, myvar):
+  def getVar(self, myvar):
     for line in self.out:
-      if line.startswith (myvar):
-	return line.strip ()
+      if line.startswith(myvar):
+	return line.strip()
     return ''

diff --git a/client/packages.py b/client/packages.py
index 5d41061..4e2bdcd 100644
--- a/client/packages.py
+++ b/client/packages.py
@@ -2,11 +2,11 @@
 import logging
 from dbapi import VARDB
 
-class Packages:
-  def getInstalledCPs (self):
-    installed_cps = sorted (VARDB.cp_all ())
+class Packages(object):
+  def getInstalledCPs(self):
+    installed_cps = sorted(VARDB.cp_all())
     return installed_cps
 
-  def getInstalledCPVs (self):
-    installed_cpvs = sorted (VARDB.cpv_all ())
+  def getInstalledCPVs(self):
+    installed_cpvs = sorted(VARDB.cpv_all())
     return installed_cpvs

diff --git a/client/useflags.py b/client/useflags.py
index 40f453c..1dbda1e 100644
--- a/client/useflags.py
+++ b/client/useflags.py
@@ -1,7 +1,7 @@
 
-from gentoolkit.flag import *
+from gentoolkit import flag
 
-class UseFlags:
+class UseFlags(object):
 
-  def getUseFlags (self, cpv):
-    return get_flags (cpv, True)[1]
+  def getUseFlags(self, cpv):
+    return flag.get_flags(cpv, True)[1]



             reply	other threads:[~2011-05-01  9:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01  9:51 Vikraman Choudhury [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-06-05  8:40 [gentoo-commits] proj/gentoostats:master commit in: client/bin/, client/ Vikraman Choudhury
2011-05-02 14:32 Vikraman Choudhury
2011-04-30  4:24 Vikraman Choudhury

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=40c723a7581cda09900368747bc705614c7a90eb.vikraman@gentoo \
    --to=vikraman.choudhury@gmail.com \
    --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