Use os.listdir() instead of portage.listdir() to avoid needless caching
authorZac Medico <zmedico@gentoo.org>
Wed, 25 Jun 2008 07:49:58 +0000 (07:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 25 Jun 2008 07:49:58 +0000 (07:49 -0000)
of directories that only need to be listed once.

svn path=/main/trunk/; revision=10779

pym/portage/dbapi/vartree.py

index 8358927221857e5c87dd133c390680bbf7dfa5ca..80738662fd007675e2b95a4dbf9b8309b661b8ec 100644 (file)
@@ -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