From 4e7b423d3c3137c3f83b71b36279e1a544154833 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Fri, 13 Apr 2018 09:13:16 -0400 Subject: core/various: python3 compat, prepare for python2 -> python3 see https://review.gluster.org/#/c/19788/ use print fn from __future__ Change-Id: If5075d8d9ca9641058fbc71df8a52aa35804cda4 updates: #411 Signed-off-by: Kaleb S. KEITHLEY --- tests/bugs/distribute/overlap.py | 3 ++- tests/bugs/nfs/socket-as-fifo.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/bugs') diff --git a/tests/bugs/distribute/overlap.py b/tests/bugs/distribute/overlap.py index 253bb4052ec..105aa6792cf 100755 --- a/tests/bugs/distribute/overlap.py +++ b/tests/bugs/distribute/overlap.py @@ -1,5 +1,6 @@ #!/usr/bin/python2 +from __future__ import print_function import sys def calculate_one (ov, nv): @@ -56,4 +57,4 @@ print '= %08x' % calculate_all(test2_vals) if __name__ == '__main__': # Return decimal so bash can reason about it. - print '%d' % calculate_all(sys.argv[1:]) + print('%d' % calculate_all(sys.argv[1:])) diff --git a/tests/bugs/nfs/socket-as-fifo.py b/tests/bugs/nfs/socket-as-fifo.py index da9886ea364..796b8ef671b 100755 --- a/tests/bugs/nfs/socket-as-fifo.py +++ b/tests/bugs/nfs/socket-as-fifo.py @@ -5,6 +5,7 @@ # Author: Niels de Vos # +from __future__ import print_function import os import stat import sys @@ -13,7 +14,7 @@ import socket ret = 1 if len(sys.argv) != 2: - print 'Usage: %s ' % (sys.argv[0]) + print('Usage: %s ' % (sys.argv[0])) sys.exit(ret) path = sys.argv[1] -- cgit