From 82ee44ed5b15dc93a3f8e8f920a4de99989786d3 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Tue, 16 Dec 2008 17:51:45 -0700 Subject: [PATCH] debug: pass empty optional arguments to ReadBucketProxy because those arguments are about to become non-optional (for other code than test/debug code) --- src/allmydata/scripts/debug.py | 4 ++-- src/allmydata/test/test_storage.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)) -- 2.45.2