]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
debug: pass empty optional arguments to ReadBucketProxy
authorZooko O'Whielacronx <zooko@zooko.com>
Wed, 17 Dec 2008 00:51:45 +0000 (17:51 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Wed, 17 Dec 2008 00:51:45 +0000 (17:51 -0700)
because those arguments are about to become non-optional (for other code than test/debug code)

src/allmydata/scripts/debug.py
src/allmydata/test/test_storage.py

index 0ac7cd8a74a7aa783102eba7b6595f3970034ed4..73a0d02867e0f7cebabc7461f7edcb864a9b7b58 100644 (file)
@@ -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"]
index 012e003c07027861cc327887b7c9b02b767128bd..4fd6ce905aab01f149ac873ad5bc218ff13415c2 100644 (file)
@@ -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))