mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-24 21:09:44 +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
|
self['filename'] = filename
|
||||||
|
|
||||||
def dump_share(options):
|
def dump_share(options):
|
||||||
from allmydata import uri, storage
|
from allmydata import storage
|
||||||
from allmydata.util import base32
|
|
||||||
|
|
||||||
out = options.stdout
|
out = options.stdout
|
||||||
|
|
||||||
@ -39,6 +38,13 @@ def dump_share(options):
|
|||||||
if prefix == storage.MutableShareFile.MAGIC:
|
if prefix == storage.MutableShareFile.MAGIC:
|
||||||
return dump_mutable_share(options)
|
return dump_mutable_share(options)
|
||||||
# otherwise assume it's immutable
|
# 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'])
|
f = storage.ShareFile(options['filename'])
|
||||||
# use a ReadBucketProxy to parse the bucket and find the uri extension
|
# use a ReadBucketProxy to parse the bucket and find the uri extension
|
||||||
bp = storage.ReadBucketProxy(None)
|
bp = storage.ReadBucketProxy(None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user