aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'client/gentoostats/payload.py')
-rw-r--r--client/gentoostats/payload.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/client/gentoostats/payload.py b/client/gentoostats/payload.py
index 40532c5..1e98b75 100644
--- a/client/gentoostats/payload.py
+++ b/client/gentoostats/payload.py
@@ -29,35 +29,35 @@ class Payload(object):
def update(self):
env = Environment()
- self.payload['PLATFORM'] = 'Unknown' if self.__masked('ENV','PLATFORM') else env.getPlatform()
- self.payload['LASTSYNC'] = 'Unknown' if self.__masked('ENV','LASTSYNC') else env.getLastSync()
- self.payload['PROFILE'] = 'Unknown' if self.__masked('ENV','PROFILE') else env.getProfile()
+ self.payload['PLATFORM'] = 'Unknown' if self.__masked('ENV', 'PLATFORM') else env.getPlatform()
+ self.payload['LASTSYNC'] = 'Unknown' if self.__masked('ENV', 'LASTSYNC') else env.getLastSync()
+ self.payload['PROFILE'] = 'Unknown' if self.__masked('ENV', 'PROFILE') else env.getProfile()
- for var in ['ARCH','CHOST','CFLAGS','CXXFLAGS','FFLAGS','LDFLAGS','MAKEOPTS','SYNC']:
- self.payload[var] = None if self.__masked('ENV',var) else env.getVar(var)
+ for var in ['ARCH', 'CHOST', 'CFLAGS', 'CXXFLAGS', 'FFLAGS', 'LDFLAGS', 'MAKEOPTS', 'SYNC']:
+ self.payload[var] = None if self.__masked('ENV', var) else env.getVar(var)
- for var in ['ACCEPT_KEYWORDS','LANG','GENTOO_MIRRORS','FEATURES','USE']:
- self.payload[var] = [] if self.__masked('ENV',var) else env.getVar(var).split()
+ for var in ['ACCEPT_KEYWORDS', 'LANG', 'GENTOO_MIRRORS', 'FEATURES', 'USE']:
+ self.payload[var] = [] if self.__masked('ENV', var) else env.getVar(var).split()
self.payload['PACKAGES'] = dict()
for cpv in Packages().getInstalledCPVs():
m = Metadata(cpv)
p = dict()
- p['REPO'] = None if self.__masked('PACKAGES','REPO') else m.getRepoName()
- p['KEYWORD'] = None if self.__masked('PACKAGES','KEYWORD') else m.getKeyword()
+ p['REPO'] = None if self.__masked('PACKAGES', 'REPO') else m.getRepoName()
+ p['KEYWORD'] = None if self.__masked('PACKAGES', 'KEYWORD') else m.getKeyword()
p['USE'] = dict()
- p['USE']['PLUS'] = [] if self.__masked('PACKAGES','USE_PLUS') else m.getPlusFlags()
- p['USE']['MINUS'] = [] if self.__masked('PACKAGES','USE_MINUS') else m.getMinusFlags()
- p['USE']['UNSET'] = [] if self.__masked('PACKAGES','USE_UNSET') else m.getUnsetFlags()
- p['COUNTER'] = None if self.__masked('PACKAGES','COUNTER') else m.getCounter()
- p['SIZE'] = None if self.__masked('PACKAGES','SIZE') else m.getSize()
- p['BUILD_TIME'] = None if self.__masked('PACKAGES','BUILD_TIME') else m.getBuildTime()
+ p['USE']['PLUS'] = [] if self.__masked('PACKAGES', 'USE_PLUS') else m.getPlusFlags()
+ p['USE']['MINUS'] = [] if self.__masked('PACKAGES', 'USE_MINUS') else m.getMinusFlags()
+ p['USE']['UNSET'] = [] if self.__masked('PACKAGES', 'USE_UNSET') else m.getUnsetFlags()
+ p['COUNTER'] = None if self.__masked('PACKAGES', 'COUNTER') else m.getCounter()
+ p['SIZE'] = None if self.__masked('PACKAGES', 'SIZE') else m.getSize()
+ p['BUILD_TIME'] = None if self.__masked('PACKAGES', 'BUILD_TIME') else m.getBuildTime()
self.payload['PACKAGES'][cpv] = p
def get(self):
return self.payload
- def dump(self,human=False):
+ def dump(self, human=False):
if human:
pprint.pprint(self.payload)
else: