prevent reading unfinished buckets

This commit is contained in:
Rob Kinninmont 2006-12-01 02:48:27 -07:00
parent c17a8db732
commit 5e40272785

View File

@ -41,6 +41,7 @@ class BucketStore(service.MultiService, Referenceable):
# for now, only returns those created by this process, in this run # for now, only returns those created by this process, in this run
bucket = self._buckets.get(verifierid) bucket = self._buckets.get(verifierid)
if bucket: if bucket:
precondition(bucket.is_complete())
return BucketReader(bucket) return BucketReader(bucket)
elif os.path.exists(self._get_bucket_dir(verifierid)): elif os.path.exists(self._get_bucket_dir(verifierid)):
bucket_dir = self._get_bucket_dir(verifierid) bucket_dir = self._get_bucket_dir(verifierid)