summaryrefslogtreecommitdiffstats
path: root/xlators/features/cloudsync
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 /xlators/features/cloudsync
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 'xlators/features/cloudsync')
-rw-r--r--xlators/features/cloudsync/src/cloudsync-fops-c.py17
-rw-r--r--xlators/features/cloudsync/src/cloudsync-fops-h.py9
2 files changed, 14 insertions, 12 deletions
diff --git a/xlators/features/cloudsync/src/cloudsync-fops-c.py b/xlators/features/cloudsync/src/cloudsync-fops-c.py
index e3030724468..fda56752871 100644
--- a/xlators/features/cloudsync/src/cloudsync-fops-c.py
+++ b/xlators/features/cloudsync/src/cloudsync-fops-c.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
+from __future__ import print_function
import os
import sys
@@ -289,17 +290,17 @@ special_fops = ['readdirp', 'statfs', 'setxattr', 'unlink', 'getxattr',
def gen_defaults():
for name in ops:
if name in fd_data_modify_op_fop_template:
- print generate(FD_DATA_MODIFYING_OP_FOP_CBK_TEMPLATE, name, cbk_subs)
- print generate(FD_DATA_MODIFYING_RESUME_OP_FOP_TEMPLATE, name, fop_subs)
- print generate(FD_DATA_MODIFYING_OP_FOP_TEMPLATE, name, fop_subs)
+ print(generate(FD_DATA_MODIFYING_OP_FOP_CBK_TEMPLATE, name, cbk_subs))
+ print(generate(FD_DATA_MODIFYING_RESUME_OP_FOP_TEMPLATE, name, fop_subs))
+ print(generate(FD_DATA_MODIFYING_OP_FOP_TEMPLATE, name, fop_subs))
elif name in loc_stat_op_fop_template:
- print generate(LOC_STAT_OP_FOP_CBK_TEMPLATE, name, cbk_subs)
- print generate(LOC_STAT_OP_FOP_TEMPLATE, name, fop_subs)
+ print(generate(LOC_STAT_OP_FOP_CBK_TEMPLATE, name, cbk_subs))
+ print(generate(LOC_STAT_OP_FOP_TEMPLATE, name, fop_subs))
for l in open(sys.argv[1], 'r').readlines():
if l.find('#pragma generate') != -1:
- print "/* BEGIN GENERATED CODE - DO NOT MODIFY */"
+ print("/* BEGIN GENERATED CODE - DO NOT MODIFY */")
gen_defaults()
- print "/* END GENERATED CODE */"
+ print("/* END GENERATED CODE */")
else:
- print l[:-1]
+ print(l[:-1])
diff --git a/xlators/features/cloudsync/src/cloudsync-fops-h.py b/xlators/features/cloudsync/src/cloudsync-fops-h.py
index 552c6b58e3a..37dfa5b10be 100644
--- a/xlators/features/cloudsync/src/cloudsync-fops-h.py
+++ b/xlators/features/cloudsync/src/cloudsync-fops-h.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
+from __future__ import print_function
import os
import sys
@@ -18,13 +19,13 @@ def gen_defaults():
for name, value in ops.iteritems():
if name == 'getspec':
continue
- print generate(OP_FOP_TEMPLATE, name, fop_subs)
+ print(generate(OP_FOP_TEMPLATE, name, fop_subs))
for l in open(sys.argv[1], 'r').readlines():
if l.find('#pragma generate') != -1:
- print "/* BEGIN GENERATED CODE - DO NOT MODIFY */"
+ print("/* BEGIN GENERATED CODE - DO NOT MODIFY */")
gen_defaults()
- print "/* END GENERATED CODE */"
+ print("/* END GENERATED CODE */")
else:
- print l[:-1]
+ print(l[:-1])