diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-29 00:08:28 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-29 00:08:28 +0000 |
commit | 58ae97c54525b1572f2c96ad81f28bca69b8edc2 (patch) | |
tree | 31eb9dc1ba9e40c3ae96842dfff6ca05eb2dd073 | |
parent | 937a8e4399cdefc18b9a5ec7bcb6c0dda4502fb6 (diff) | |
download | portage-58ae97c54525b1572f2c96ad81f28bca69b8edc2.tar.gz portage-58ae97c54525b1572f2c96ad81f28bca69b8edc2.tar.bz2 portage-58ae97c54525b1572f2c96ad81f28bca69b8edc2.zip |
Make portdbapi.cp_list() use os.listdir() instead of
portage.listdir() since portage.listdir() has unnecessary
overhead and it's cache isn't needed since cp_list() has
it's own cache.
svn path=/main/trunk/; revision=8336
-rw-r--r-- | pym/portage/dbapi/porttree.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 84f8c196d..ec38e0850 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -511,7 +511,11 @@ class portdbapi(dbapi): else: mytrees = self.porttrees for oroot in mytrees: - for x in listdir(oroot+"/"+mycp, EmptyOnError=1, ignorecvs=1): + try: + file_list = os.listdir(os.path.join(oroot, mycp)) + except OSError: + continue + for x in file_list: if x.endswith(".ebuild"): pf = x[:-7] ps = pkgsplit(pf) |