Index: pym/cache/flat_hash.py =================================================================== --- pym/cache/flat_hash.py (revision 6265) +++ pym/cache/flat_hash.py (revision 6266) @@ -107,7 +107,15 @@ 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)