[PATCHv2 15/25] python3: cpu-reformat: Use the print() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Radostin Stoyanov <rstoyanov1@xxxxxxxxx>
---
 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 33976e775..d4ed8d811 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")
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux