From d65f487a9198bbc54b86ccc8f005f7f243c808a6 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Tue, 20 Mar 2018 06:48:58 +0000 Subject: [PATCH] python3: cpu-reformat: Use the print() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the print statement, that is only available in Py2, with a print function that is available in both Py2 and Py3 and drop the explicit python version in the shebang. Reviewed-by: Daniel P. Berrangé Signed-off-by: Radostin Stoyanov --- tests/cputestdata/cpu-reformat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cputestdata/cpu-reformat.py b/tests/cputestdata/cpu-reformat.py index 33976e7753..d4ed8d8118 100755 --- a/tests/cputestdata/cpu-reformat.py +++ b/tests/cputestdata/cpu-reformat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python import sys import json @@ -6,4 +6,4 @@ import json dec = json.JSONDecoder() data, pos = dec.raw_decode(sys.stdin.read()) json.dump(data, sys.stdout, indent=2, separators=(',', ': ')) -print +print("\n") -- GitLab