]> xenbits.xensource.com Git - libvirt.git/commitdiff
python3: cpu-reformat: Use the print() function
authorRadostin Stoyanov <rstoyanov1@gmail.com>
Tue, 20 Mar 2018 06:48:58 +0000 (06:48 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 20 Mar 2018 12:13:36 +0000 (12:13 +0000)
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é <berrange@redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
tests/cputestdata/cpu-reformat.py

index 33976e7753e92c4b835af62f7d9e7ac0756ed32f..d4ed8d8118e8345c4c2d59978cbbd5ec5d428550 100755 (executable)
@@ -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")