summaryrefslogtreecommitdiffstats
path: root/api/examples
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-04-13 09:13:16 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2018-05-02 11:28:46 +0000
commit4e7b423d3c3137c3f83b71b36279e1a544154833 (patch)
treee59dc57aa319a5e145161a0e32fba9fc74773e91 /api/examples
parent9da91172538a2a95fba609c93e199db159fd1938 (diff)
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 <kkeithle@redhat.com>
Diffstat (limited to 'api/examples')
-rwxr-xr-xapi/examples/getvolfile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/api/examples/getvolfile.py b/api/examples/getvolfile.py
index 961a89c9808..f1d5761d6b1 100755
--- a/api/examples/getvolfile.py
+++ b/api/examples/getvolfile.py
@@ -1,5 +1,6 @@
#!/usr/bin/python2
+from __future__ import print_function
import ctypes
import ctypes.util
@@ -35,10 +36,10 @@ if __name__ == "__main__":
try:
res = apply(get_volfile, sys.argv[1:3])
except:
- print "fetching volfile failed (volume not started?)"
+ print("fetching volfile failed (volume not started?)")
try:
for line in res.split('\n'):
- print line
+ print(line)
except:
- print "bad return value %s" % res
+ print("bad return value %s" % res)