summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/gen-defaults.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/libglusterfs/src/gen-defaults.py b/libglusterfs/src/gen-defaults.py
index b94fbe1444e..e577eb71863 100644
--- a/libglusterfs/src/gen-defaults.py
+++ b/libglusterfs/src/gen-defaults.py
@@ -1,5 +1,6 @@
#!/usr/bin/python2
+from __future__ import print_function
import sys
from generator import ops, fop_subs, cbk_subs, generate
@@ -61,20 +62,20 @@ default_@NAME@ (
def gen_defaults ():
for name in ops.iterkeys():
- print generate(FAILURE_CBK_TEMPLATE,name,cbk_subs)
+ print(generate(FAILURE_CBK_TEMPLATE,name,cbk_subs))
for name in ops.iterkeys():
- print generate(CBK_RESUME_TEMPLATE,name,cbk_subs)
+ print(generate(CBK_RESUME_TEMPLATE,name,cbk_subs))
for name in ops.iterkeys():
- print generate(CBK_TEMPLATE,name,cbk_subs)
+ print(generate(CBK_TEMPLATE,name,cbk_subs))
for name in ops.iterkeys():
- print generate(RESUME_TEMPLATE,name,fop_subs)
+ print(generate(RESUME_TEMPLATE,name,fop_subs))
for name in ops.iterkeys():
- print generate(FOP_TEMPLATE,name,fop_subs)
+ print(generate(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])