[libvirt] [PATCH 14/22] 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux