From: Zooko O'Whielacronx Date: Wed, 17 Dec 2008 00:51:45 +0000 (-0700) Subject: debug: pass empty optional arguments to ReadBucketProxy X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/frontends/%22news.html?a=commitdiff_plain;h=82ee44ed5b15dc93a3f8e8f920a4de99989786d3;p=tahoe-lafs%2Ftahoe-lafs.git debug: pass empty optional arguments to ReadBucketProxy because those arguments are about to become non-optional (for other code than test/debug code) --- diff --git a/src/allmydata/scripts/debug.py b/src/allmydata/scripts/debug.py index 0ac7cd8a..73a0d028 100644 --- a/src/allmydata/scripts/debug.py +++ b/src/allmydata/scripts/debug.py @@ -53,7 +53,7 @@ def dump_immutable_share(options): out = options.stdout f = storage.ShareFile(options['filename']) # use a ReadBucketProxy to parse the bucket and find the uri extension - bp = ReadBucketProxy(None) + bp = ReadBucketProxy(None, '', '') offsets = bp._parse_offsets(f.read_share_data(0, 0x44)) print >>out, "%20s: %d" % ("version", bp._version) seek = offsets['uri_extension'] @@ -734,7 +734,7 @@ def corrupt_share(options): else: # otherwise assume it's immutable f = storage.ShareFile(fn) - bp = ReadBucketProxy(None) + bp = ReadBucketProxy(None, '', '') offsets = bp._parse_offsets(f.read_share_data(0, 0x24)) start = f._data_offset + offsets["data"] end = f._data_offset + offsets["plaintext_hash_tree"] diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 012e003c..4fd6ce90 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -182,7 +182,7 @@ class BucketProxy(unittest.TestCase): br = BucketReader(self, sharefname) rb = RemoteBucket() rb.target = br - rbp = rbp_class(rb, peerid="abc") + rbp = rbp_class(rb, peerid="abc", storage_index="") self.failUnless("to peer" in repr(rbp)) self.failUnless(interfaces.IStorageBucketReader.providedBy(rbp))