summaryrefslogtreecommitdiffstats
path: root/xlators/features/cloudsync/src/cloudsync-fops-h.py
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/cloudsync/src/cloudsync-fops-h.py')
-rwxr-xr-x[-rw-r--r--]xlators/features/cloudsync/src/cloudsync-fops-h.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/xlators/features/cloudsync/src/cloudsync-fops-h.py b/xlators/features/cloudsync/src/cloudsync-fops-h.py
index 552c6b58e3a..faa2de651a7 100644..100755
--- 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
+#!/usr/bin/python3
+from __future__ import print_function
import os
import sys
@@ -15,16 +16,16 @@ cs_@NAME@ (call_frame_t *frame, xlator_t *this,
"""
def gen_defaults():
- for name, value in ops.iteritems():
+ for name, value in ops.items():
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])