From c5ed4cb4570f11eb9e8d4cdd23dc92734712e5f3 Mon Sep 17 00:00:00 2001 From: Deborah Servili Date: Wed, 28 Feb 2018 16:19:16 +0100 Subject: [PATCH] modify argument in add_missing_uuid script --- tools/add_missing_uuid.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)