From 0e34bf64bdea54f572d7f615ecbda3d295d905ad Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Tue, 25 Oct 2022 18:06:43 +0300 Subject: [PATCH] [#30] presets: Pretty JSON files Signed-off-by: Pavel Karpy --- scenarios/preset/preset_grpc.py | 2 +- scenarios/preset/preset_s3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scenarios/preset/preset_grpc.py b/scenarios/preset/preset_grpc.py index 9ebc86b..06ec901 100755 --- a/scenarios/preset/preset_grpc.py +++ b/scenarios/preset/preset_grpc.py @@ -69,7 +69,7 @@ def main(): data = {'containers': container_list, 'objects': objects_struct, 'obj_size': args.size + " Kb"} with open(args.out, 'w+') as f: - json.dump(data, f, ensure_ascii=False) + json.dump(data, f, ensure_ascii=False, indent=2) print(f"Result:") print(f" > Total Containers has been created: {len(container_list)}.") diff --git a/scenarios/preset/preset_s3.py b/scenarios/preset/preset_s3.py index 0247a3e..e2bdc7d 100755 --- a/scenarios/preset/preset_s3.py +++ b/scenarios/preset/preset_s3.py @@ -67,7 +67,7 @@ def main(): data = {'buckets': bucket_list, 'objects': objects_struct, 'obj_size': args.size + " Kb"} with open(args.out, 'w+') as f: - json.dump(data, f, ensure_ascii=False) + json.dump(data, f, ensure_ascii=False, indent=2) print(f"Result:") print(f" > Total Buckets has been created: {len(bucket_list)}.")