From: Rob Kinninmont Date: Fri, 1 Dec 2006 09:48:27 +0000 (-0700) Subject: prevent reading unfinished buckets X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~504 X-Git-Url: https://git.rkrishnan.org/simplejson/quickstart.html?a=commitdiff_plain;h=5e40272785b619bd2de3108cf8027d9eb76c6bfa;p=tahoe-lafs%2Ftahoe-lafs.git prevent reading unfinished buckets --- diff --git a/allmydata/bucketstore.py b/allmydata/bucketstore.py index 0348b5ac..84b7083a 100644 --- a/allmydata/bucketstore.py +++ b/allmydata/bucketstore.py @@ -41,6 +41,7 @@ class BucketStore(service.MultiService, Referenceable): # for now, only returns those created by this process, in this run bucket = self._buckets.get(verifierid) if bucket: + precondition(bucket.is_complete()) return BucketReader(bucket) elif os.path.exists(self._get_bucket_dir(verifierid)): bucket_dir = self._get_bucket_dir(verifierid)