mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-01 00:45:52 +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."""
|
longdesc = """Print a list of all files/directories reachable from the given starting point."""
|
||||||
|
|
||||||
class StatsOptions(VDriveOptions):
|
class StatsOptions(VDriveOptions):
|
||||||
|
optFlags = [
|
||||||
|
("verbose", "v", "Display raw JSON data instead of parsed"),
|
||||||
|
]
|
||||||
def parseArgs(self, where=''):
|
def parseArgs(self, where=''):
|
||||||
self.where = where
|
self.where = where
|
||||||
|
|
||||||
|
@ -63,9 +63,13 @@ class SlowOperationRunner:
|
|||||||
if resp.status != 200:
|
if resp.status != 200:
|
||||||
print >>stderr, "ERROR", resp.status, resp.reason, resp.read()
|
print >>stderr, "ERROR", resp.status, resp.reason, resp.read()
|
||||||
return True
|
return True
|
||||||
data = simplejson.loads(resp.read())
|
jdata = resp.read()
|
||||||
|
data = simplejson.loads(jdata)
|
||||||
if not data["finished"]:
|
if not data["finished"]:
|
||||||
return False
|
return False
|
||||||
|
if self.options.get("verbose"):
|
||||||
|
print jdata
|
||||||
|
return True
|
||||||
self.write_results(data)
|
self.write_results(data)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user