From 07a6c1c7d78e405be435221800eeddcc474d4b7f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 25 Jun 2008 07:49:58 +0000 Subject: [PATCH] Use os.listdir() instead of portage.listdir() to avoid needless caching of directories that only need to be listed once. svn path=/main/trunk/; revision=10779 --- pym/portage/dbapi/vartree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 835892722..80738662f 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1490,7 +1490,7 @@ class dblink(object): # name of the dir; the package may have been moved. myebuildpath = None ebuild_phase = "prerm" - mystuff = listdir(self.dbdir, EmptyOnError=1) + mystuff = os.listdir(self.dbdir) for x in mystuff: if x.endswith(".ebuild"): myebuildpath = os.path.join(self.dbdir, self.pkg + ".ebuild") @@ -2522,7 +2522,7 @@ class dblink(object): return a # copy "info" files (like SLOT, CFLAGS, etc.) into the database - for x in listdir(inforoot): + for x in os.listdir(inforoot): self.copyfile(inforoot+"/"+x) # write local package counter for recording -- 2.26.2