Output valid JSON with the --json
option
Don't just print the data object, `json.dump` it
This commit is contained in:
parent
27d1053a27
commit
62deb71a8d
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
def save(data, filename):
|
def save(data, filename):
|
||||||
if a.o is None:
|
if a.o is None:
|
||||||
print(data)
|
json.dump(data, sys.stdout, indent=4)
|
||||||
else:
|
else:
|
||||||
out_dir_parent = os.path.abspath(
|
out_dir_parent = os.path.abspath(
|
||||||
os.path.expanduser(os.path.expandvars(a.o))
|
os.path.expanduser(os.path.expandvars(a.o))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue