From acb0297806cf5ef17fe20ebd85decd01860c471c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 12 Aug 2008 13:55:17 -0700 Subject: [PATCH] scripts/debug: split out dump_immutable_share --- src/allmydata/scripts/debug.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/allmydata/scripts/debug.py b/src/allmydata/scripts/debug.py index 97921f39..a32c67c3 100644 --- a/src/allmydata/scripts/debug.py +++ b/src/allmydata/scripts/debug.py @@ -25,8 +25,7 @@ verify-cap for the file that uses the share. self['filename'] = filename def dump_share(options): - from allmydata import uri, storage - from allmydata.util import base32 + from allmydata import storage out = options.stdout @@ -39,6 +38,13 @@ def dump_share(options): if prefix == storage.MutableShareFile.MAGIC: return dump_mutable_share(options) # otherwise assume it's immutable + return dump_immutable_share(options) + +def dump_immutable_share(options): + from allmydata import uri, storage + from allmydata.util import base32 + + out = options.stdout f = storage.ShareFile(options['filename']) # use a ReadBucketProxy to parse the bucket and find the uri extension bp = storage.ReadBucketProxy(None) -- 2.45.2