From 9be2cefecf0e5437778f053f5e4028580e858ee7 Mon Sep 17 00:00:00 2001 From: Jim Fulton <jim@zope.com> Date: Sun, 4 Jan 2009 23:47:29 +0000 Subject: [PATCH] Fixed a race condition in the function that computes durectory sizes. --- src/ZEO/tests/zeo_blob_cache.test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ZEO/tests/zeo_blob_cache.test b/src/ZEO/tests/zeo_blob_cache.test index f47d6e9f..9ce43ad7 100644 --- a/src/ZEO/tests/zeo_blob_cache.test +++ b/src/ZEO/tests/zeo_blob_cache.test @@ -60,7 +60,11 @@ directory. ... for base, dirs, files in os.walk(d): ... for f in files: ... if f.endswith('.blob'): - ... size += os.stat(os.path.join(base, f)).st_size + ... try: + ... size += os.stat(os.path.join(base, f)).st_size + ... except OSError: + ... if os.path.exists(os.path.join(base, f)): + ... raise ... return size >>> db.storage._check_blob_size_thread.join() -- 2.30.9