diff --git a/elastic_recheck/cmd/graph.py b/elastic_recheck/cmd/graph.py index 7c03ef45..5b9a4d7a 100755 --- a/elastic_recheck/cmd/graph.py +++ b/elastic_recheck/cmd/graph.py @@ -235,7 +235,9 @@ def main(): out = sys.stdout try: - out.write(json.dumps(jsondata)) + # indent the json output if we're writing to a file + indent = 4 if args.output else None + out.write(json.dumps(jsondata, indent=indent)) finally: out.close()