aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/build/scripts/parse-json.py
diff options
context:
space:
mode:
authoreschcam <cameron.scholes@est.tech>2023-06-19 17:39:10 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-06-20 10:14:27 +0000
commita622b7fe17a94698c1d242772d5d1b1d48761a29 (patch)
treee35dd9070a008a0c9b65494dc6094e44fe3a8f23 /openecomp-be/tools/build/scripts/parse-json.py
parentf845ac23cdd262b7624785283531952e38557deb (diff)
Migrate Python 2 files to Python 3
Issue-ID: SDC-4498 Signed-off-by: eschcam <cameron.scholes@est.tech> Change-Id: I6b55fcd799371dd209898607c90d5c348e242c36
Diffstat (limited to 'openecomp-be/tools/build/scripts/parse-json.py')
-rw-r--r--openecomp-be/tools/build/scripts/parse-json.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/openecomp-be/tools/build/scripts/parse-json.py b/openecomp-be/tools/build/scripts/parse-json.py
index 46537ceac5..83c70aac01 100644
--- a/openecomp-be/tools/build/scripts/parse-json.py
+++ b/openecomp-be/tools/build/scripts/parse-json.py
@@ -41,17 +41,19 @@ from collections import OrderedDict
def readJsonFile(file, type):
- with open(file, 'r') as f:
- data = json.load(f, object_pairs_hook=OrderedDict)
- return data[type]
+ with open(file, 'r') as f:
+ data = json.load(f, object_pairs_hook=OrderedDict)
+ return data[type]
+
def printJsonTypeEntries(jsonData):
- for i in jsonData.keys():
- print jsonData[i] + ';'
+ for i in jsonData.keys():
+ print(jsonData[i] + ';')
def usage():
- print 'parseJsonFile.py [-f <json-file> & -t <cql-type: drop|create|insert|update|select]'
+ print('parseJsonFile.py [-f <json-file> & -t <cql-type: drop|create|insert|update|select]')
+
def main(argv):
action = ''