diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-03-23 00:16:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-03-23 00:16:32 +0000 |
commit | 2f341cdba252e737fa0f59dcc0a0c03a8beeb80f (patch) | |
tree | 48620bdc1146d9a3101f9b8569af4862a4ab6501 /pym/cache | |
parent | b26143363531af868c65fd0a34c6eeab8da81cfb (diff) | |
download | portage-2f341cdba252e737fa0f59dcc0a0c03a8beeb80f.tar.gz portage-2f341cdba252e737fa0f59dcc0a0c03a8beeb80f.tar.bz2 portage-2f341cdba252e737fa0f59dcc0a0c03a8beeb80f.zip |
Ignore non-existent directories for bug #171809. This is required for readonly mode. (trunk r6264:6265)
svn path=/main/branches/2.1.2/; revision=6266
Diffstat (limited to 'pym/cache')
-rw-r--r-- | pym/cache/flat_hash.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pym/cache/flat_hash.py b/pym/cache/flat_hash.py index 48e8a175e..48145881c 100644 --- a/pym/cache/flat_hash.py +++ b/pym/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) |