diff --git a/tools/add_missing_uuid.py b/tools/add_missing_uuid.py index a556216..229a9b3 100644 --- a/tools/add_missing_uuid.py +++ b/tools/add_missing_uuid.py @@ -6,10 +6,10 @@ import argparse import uuid parser = argparse.ArgumentParser(description='Add missing uuids in clusters') -parser.add_argument("-f", "--filename", required=True, help="nameof the cluster (without .json)") +parser.add_argument("-f", "--filename", required=True, help="name of the cluster") args = parser.parse_args() -with open(args.filename+'.json') as json_file: +with open(args.filename) as json_file: data = json.load(json_file) json_file.close() @@ -17,5 +17,5 @@ with open(args.filename+'.json') as json_file: if 'uuid' not in value: value['uuid'] = str(uuid.uuid4()) -with open(args.filename+'.json', 'w') as json_file: +with open(args.filename, 'w') as json_file: json.dump(data, json_file, indent=4)