summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache/flat_hash.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-03-23 00:15:42 +0000
committerZac Medico <zmedico@gentoo.org>2007-03-23 00:15:42 +0000
commit452632ca35a8c2c874f2e603e200ba39c5822ad7 (patch)
treeb7859b6735bea4dc7a935e19ac067fe770b5489a /pym/portage/cache/flat_hash.py
parent64033a37ea92b05ad112e5a785f367763c12e0bf (diff)
downloadportage-452632ca35a8c2c874f2e603e200ba39c5822ad7.tar.gz
portage-452632ca35a8c2c874f2e603e200ba39c5822ad7.tar.bz2
portage-452632ca35a8c2c874f2e603e200ba39c5822ad7.zip
Ignore non-existent directories for bug #171809. This is required for readonly mode.
svn path=/main/trunk/; revision=6265
Diffstat (limited to 'pym/portage/cache/flat_hash.py')
-rw-r--r--pym/portage/cache/flat_hash.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pym/portage/cache/flat_hash.py b/pym/portage/cache/flat_hash.py
index 24998a6d3..05b900ea8 100644
--- a/pym/portage/cache/flat_hash.py
+++ b/pym/portage/cache/flat_hash.py
@@ -107,7 +107,15 @@ class database(fs_template.FsBased):
dirs = [self.location]
len_base = len(self.location)
while len(dirs):
- for l in os.listdir(dirs[0]):
+ try:
+ dir_list = os.listdir(dirs[0])
+ except OSError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ del e
+ dirs.pop(0)
+ continue
+ for l in dir_list:
if l.endswith(".cpickle"):
continue
p = os.path.join(dirs[0],l)