def current_pkgsourcelist(self): filename = utils.ext_ospath_join(self.path, 'sources.d', self.dist.pkgsrc_name) if not os.path.exists(filename): return None keylist = utils.ext_ospath_join(self.path, 'sources.d', 'keylist.txt') return filename, keylist
def _read(query): dist = distro.Distribution().name if not dist: return [] query = utils.ext_ospath_join(self.path, dist, query) if not os.path.isfile(query): return [] return [ e for e in open(query, 'r').read().split('\n') if not e.startswith('#') and e]