mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 19:26:25 +00:00
cli: add --verbose to 'tahoe manifest', to show the raw JSON data
This commit is contained in:
parent
0a819e2912
commit
94de73ddc0
@ -210,6 +210,9 @@ class ManifestOptions(VDriveOptions):
|
||||
longdesc = """Print a list of all files/directories reachable from the given starting point."""
|
||||
|
||||
class StatsOptions(VDriveOptions):
|
||||
optFlags = [
|
||||
("verbose", "v", "Display raw JSON data instead of parsed"),
|
||||
]
|
||||
def parseArgs(self, where=''):
|
||||
self.where = where
|
||||
|
||||
|
@ -63,9 +63,13 @@ class SlowOperationRunner:
|
||||
if resp.status != 200:
|
||||
print >>stderr, "ERROR", resp.status, resp.reason, resp.read()
|
||||
return True
|
||||
data = simplejson.loads(resp.read())
|
||||
jdata = resp.read()
|
||||
data = simplejson.loads(jdata)
|
||||
if not data["finished"]:
|
||||
return False
|
||||
if self.options.get("verbose"):
|
||||
print jdata
|
||||
return True
|
||||
self.write_results(data)
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user