mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
scripts/debug: split out dump_immutable_share
This commit is contained in:
parent
533afd039f
commit
acb0297806
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user