1 |
Author: zmedico |
2 |
Date: 2010-01-31 00:59:25 +0000 (Sun, 31 Jan 2010) |
3 |
New Revision: 15297 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/cache/flat_hash.py |
7 |
Log: |
8 |
In __iter__, handle OSError from lstat in case a cache entry disappears. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/cache/flat_hash.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/cache/flat_hash.py 2010-01-31 00:53:47 UTC (rev 15296) |
14 |
+++ main/trunk/pym/portage/cache/flat_hash.py 2010-01-31 00:59:25 UTC (rev 15297) |
15 |
@@ -135,7 +135,11 @@ |
16 |
if l.endswith(".cpickle"): |
17 |
continue |
18 |
p = os.path.join(dir_path, l) |
19 |
- st = os.lstat(p) |
20 |
+ try: |
21 |
+ st = os.lstat(p) |
22 |
+ except OSError: |
23 |
+ # Cache entry disappeared. |
24 |
+ continue |
25 |
if stat.S_ISDIR(st.st_mode): |
26 |
# Only recurse 1 deep, in order to avoid iteration over |
27 |
# entries from another nested cache instance. This can |