From bd2593c7bf1a7816ec3f87ac192fb17cb4b5276d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 20 Dec 2007 16:26:25 +0000 Subject: [PATCH] Remove some redunant categories code. svn path=/main/branches/2.1.2/; revision=8996 --- pym/portage.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index cb69a9c56..abe0ebb73 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6270,14 +6270,9 @@ class vardbapi(dbapi): del self.cpcache[mycp] return returnme - def cpv_all(self,use_cache=1): - returnme=[] - basepath = self.root+VDB_PATH+"/" - categories = self.categories - if not categories: - categories = [cat for cat in listdir(basepath, dirsonly=True) \ - if self._category_re.match(cat)] - self.categories = categories + def cpv_all(self, use_cache=1): + returnme = [] + basepath = os.path.join(self.root, VDB_PATH) + os.path.sep for x in listdir(basepath, EmptyOnError=1, ignorecvs=1, dirsonly=1): if not self._category_re.match(x): continue -- 2.26.2