summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorLumir Balhar <lbalhar@redhat.com>2017-08-08 10:56:17 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-08-22 13:47:15 +0200
commit051a3ff6eb7dad08202b13aadbc6829370cc3f4b (patch)
tree4a6c14c3c6fa5791821fe767e27b43864a4f2479 /source4
parentfe9067bcc7d605ef0df5721ea290f920f6cf241e (diff)
downloadsamba-051a3ff6eb7dad08202b13aadbc6829370cc3f4b.tar.gz
python: scripting: Port ntstatus and werror generators to Python 3 compatible form.
Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/bin/gen_error_common.py2
-rwxr-xr-xsource4/scripting/bin/gen_ntstatus.py8
-rwxr-xr-x[-rw-r--r--]source4/scripting/bin/gen_werror.py8
3 files changed, 9 insertions, 9 deletions
diff --git a/source4/scripting/bin/gen_error_common.py b/source4/scripting/bin/gen_error_common.py
index a55baeaf788..ab86c4d2842 100644
--- a/source4/scripting/bin/gen_error_common.py
+++ b/source4/scripting/bin/gen_error_common.py
@@ -77,6 +77,6 @@ def parseErrorDescriptions( file_contents, isWinError, transformErrorFunction ):
else:
err.err_string = err.err_string + " " + desc
count = count + 1
- print "parsed %d lines generated %d error definitions"%(count,len(errors))
+ print("parsed %d lines generated %d error definitions"%(count,len(errors)))
return errors
diff --git a/source4/scripting/bin/gen_ntstatus.py b/source4/scripting/bin/gen_ntstatus.py
index 9592ab22bfd..3267c3295ad 100755
--- a/source4/scripting/bin/gen_ntstatus.py
+++ b/source4/scripting/bin/gen_ntstatus.py
@@ -122,7 +122,7 @@ def main ():
gen_sourcefile_name = sys.argv[3]
gen_pythonfile_name = sys.argv[4]
else:
- print "usage: %s winerrorfile headerfile sourcefile pythonfile" % (sys.argv[0])
+ print("usage: %s winerrorfile headerfile sourcefile pythonfile" % (sys.argv[0]))
sys.exit()
# read in the data
@@ -130,15 +130,15 @@ def main ():
errors = parseErrorDescriptions(file_contents, False, transformErrorName)
- print "writing new header file: %s" % gen_headerfile_name
+ print("writing new header file: %s" % gen_headerfile_name)
out_file = open(gen_headerfile_name, "w")
generateHeaderFile(out_file, errors)
out_file.close()
- print "writing new source file: %s" % gen_sourcefile_name
+ print("writing new source file: %s" % gen_sourcefile_name)
out_file = open(gen_sourcefile_name, "w")
generateSourceFile(out_file, errors)
out_file.close()
- print "writing new python file: %s" % gen_pythonfile_name
+ print("writing new python file: %s" % gen_pythonfile_name)
out_file = open(gen_pythonfile_name, "w")
generatePythonFile(out_file, errors)
out_file.close()
diff --git a/source4/scripting/bin/gen_werror.py b/source4/scripting/bin/gen_werror.py
index 7210d3fa78c..9a545726ba5 100644..100755
--- a/source4/scripting/bin/gen_werror.py
+++ b/source4/scripting/bin/gen_werror.py
@@ -124,22 +124,22 @@ def main():
gen_sourcefile_name = sys.argv[3]
gen_pythonfile_name = sys.argv[4]
else:
- print "usage: %s winerrorfile headerfile sourcefile pythonfile" % sys.argv[0]
+ print("usage: %s winerrorfile headerfile sourcefile pythonfile" % sys.argv[0])
sys.exit()
input_file = open(input_file_name, "r")
errors = parseErrorDescriptions(input_file, True, transformErrorName)
input_file.close()
- print "writing new header file: %s" % gen_headerfile_name
+ print("writing new header file: %s" % gen_headerfile_name)
out_file = open(gen_headerfile_name, "w")
generateHeaderFile(out_file, errors)
out_file.close()
- print "writing new source file: %s" % gen_sourcefile_name
+ print("writing new source file: %s" % gen_sourcefile_name)
out_file = open(gen_sourcefile_name, "w")
generateSourceFile(out_file, errors)
out_file.close()
- print "writing new python file: %s" % gen_pythonfile_name
+ print("writing new python file: %s" % gen_pythonfile_name)
out_file = open(gen_pythonfile_name, "w")
generatePythonFile(out_file, errors)
out_file.close()