diff options
Diffstat (limited to 'client/gentoostats/metadata.py')
-rw-r--r-- | client/gentoostats/metadata.py | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/client/gentoostats/metadata.py b/client/gentoostats/metadata.py index 224fbfd..fb36a12 100644 --- a/client/gentoostats/metadata.py +++ b/client/gentoostats/metadata.py @@ -6,40 +6,40 @@ from gentoolkit.enalyze.lib import KeywordAnalyser class Metadata(object): - def __init__(self, cpv): - self.repo, self.counter, self.build_time, self.size = VARDB.aux_get(cpv,['repository','COUNTER','BUILD_TIME','SIZE']) + def __init__(self, cpv): + self.repo, self.counter, self.build_time, self.size = VARDB.aux_get(cpv,['repository','COUNTER','BUILD_TIME','SIZE']) - system_use = portage.settings['USE'].split() - fa = FlagAnalyzer(system=system_use) - self.flags = fa.analyse_cpv(cpv) + system_use = portage.settings['USE'].split() + fa = FlagAnalyzer(system=system_use) + self.flags = fa.analyse_cpv(cpv) - arch = portage.settings['ARCH'] - accept_keywords = portage.settings['ACCEPT_KEYWORDS'].split() - ka = KeywordAnalyser(arch=arch,accept_keywords=accept_keywords) - self.keyword = ka.get_inst_keyword_cpv(cpv) + arch = portage.settings['ARCH'] + accept_keywords = portage.settings['ACCEPT_KEYWORDS'].split() + ka = KeywordAnalyser(arch=arch,accept_keywords=accept_keywords) + self.keyword = ka.get_inst_keyword_cpv(cpv) - def getPlusFlags(self): - return list(self.flags[0]) + def getPlusFlags(self): + return list(self.flags[0]) - def getMinusFlags(self): - return list(self.flags[1]) + def getMinusFlags(self): + return list(self.flags[1]) - def getUnsetFlags(self): - return list(self.flags[2]) + def getUnsetFlags(self): + return list(self.flags[2]) - def getKeyword(self): - return self.keyword + def getKeyword(self): + return self.keyword - def getRepoName(self): - if self.repo: - return self.repo - return 'Unknown' + def getRepoName(self): + if self.repo: + return self.repo + return 'Unknown' - def getCounter(self): - return self.counter + def getCounter(self): + return self.counter - def getBuildTime(self): - return self.build_time + def getBuildTime(self): + return self.build_time - def getSize(self): - return self.size + def getSize(self): + return self.size |