1 |
Author: zmedico |
2 |
Date: 2010-03-02 19:50:41 +0000 (Tue, 02 Mar 2010) |
3 |
New Revision: 15536 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.7/pym/portage/cache/flat_hash.py |
7 |
Log: |
8 |
In __iter__, handle OSError from lstat in case a cache entry disappears. |
9 |
(trunk r15297) |
10 |
|
11 |
Modified: main/branches/2.1.7/pym/portage/cache/flat_hash.py |
12 |
=================================================================== |
13 |
--- main/branches/2.1.7/pym/portage/cache/flat_hash.py 2010-03-02 19:50:33 UTC (rev 15535) |
14 |
+++ main/branches/2.1.7/pym/portage/cache/flat_hash.py 2010-03-02 19:50:41 UTC (rev 15536) |
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 |