From: Zooko O'Whielacronx Date: Sat, 31 Mar 2007 00:07:04 +0000 (-0700) Subject: fix bug in storage-server: yes, "0" is a number, Mr. storage server X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/%22doc.html/(%5B%5E?a=commitdiff_plain;h=826ce43be71502433aab2b56fd2ac220c7be42b7;p=tahoe-lafs%2Ftahoe-lafs.git fix bug in storage-server: yes, "0" is a number, Mr. storage server --- diff --git a/src/allmydata/storageserver.py b/src/allmydata/storageserver.py index 23d3ece6..764ba32b 100644 --- a/src/allmydata/storageserver.py +++ b/src/allmydata/storageserver.py @@ -19,7 +19,7 @@ from allmydata.util.assertutil import _assert, precondition # store/$VERIFIERID/$SHARENUM/sharehashtree # $SHARENUM matches this regex: -NUM_RE=re.compile("[1-9][0-9]*") +NUM_RE=re.compile("[0-9]*") class BucketWriter(Referenceable): implements(RIBucketWriter) @@ -117,6 +117,6 @@ class StorageServer(service.MultiService, Referenceable): bucketreaders = {} # k: sharenum, v: BucketReader verifierdir = os.path.join(self.storedir, idlib.b2a(verifierid)) for f in os.listdir(verifierdir): - _assert(NUM_RE.match(f)) + _assert(NUM_RE.match(f), f) bucketreaders[int(f)] = BucketReader(os.path.join(verifierdir, f)) return bucketreaders