From 57ead8935674f1c487f9a5b347231b37d6650805 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 12 Jun 2020 14:38:29 -0700 Subject: lint: convert checkpatch_json.py to python 3 Align all coreboot scripts on one python version. Tested by running the original suggested test: $ nice -n 20 git diff HEAD~ | util/lint/checkpatch.pl \ --no-signoff -q - | tee checkpatch.txt $ util/lint/checkpatch_json.py checkpatch.txt \ comment.json checkpatch.txt Change-Id: Iec2bb0be23b27a3eaf92f293c962a8e6bfb03af0 Signed-off-by: Stefan Reinauer Reviewed-on: https://review.coreboot.org/c/coreboot/+/42318 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- util/lint/checkpatch_json.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'util') diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py index 7da213c7d0..8102c114b9 100755 --- a/util/lint/checkpatch_json.py +++ b/util/lint/checkpatch_json.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-only """ @@ -41,14 +41,14 @@ def parse_file(input_file): def main(): if (len(sys.argv) < 3) or (sys.argv[1] == "-h"): - print "HELP:" - print sys.argv[0] + " " + print("HELP:") + print(sys.argv[0] + " ") sys.exit() - print sys.argv[1] + print(sys.argv[1]) parse_file(sys.argv[1]) data['comments'] = list_temp - print json.dumps(data) + print(json.dumps(data)) out_file = open( sys.argv[2] , "w") json.dump(data, out_file, sort_keys=True, indent=4) out_file.close() -- cgit v1.2.3