From 7f3116a63d7d91f4c0d26adf8fcdef0a5a957971 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 8 Apr 2010 07:45:46 +1000 Subject: build: allow the waf build to work with python 3.0 and 3.1 Python 3.x is a bit fussier about print statements and indentation. Signed-off-by: Andrew Tridgell --- buildtools/wafsamba/samba_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'buildtools/wafsamba/samba_utils.py') diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 8a8a7e3975..a527e811fa 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -220,7 +220,7 @@ def subst_vars_error(string, env): if re.match('\$\{\w+\}', v): vname = v[2:-1] if not vname in env: - print "Failed to find variable %s in %s" % (vname, string) + print("Failed to find variable %s in %s" % (vname, string)) sys.exit(1) v = env[vname] out.append(v) @@ -356,7 +356,7 @@ def RUN_COMMAND(cmd, return os.WEXITSTATUS(status) if os.WIFSIGNALED(status): return - os.WTERMSIG(status) - print "Unknown exit reason %d for command: %s" (status, cmd) + print("Unknown exit reason %d for command: %s" (status, cmd)) return -1 @@ -434,7 +434,7 @@ def RECURSE(ctx, directory): return ctx.sub_config(relpath) if ctxclass == 'BuildContext': return ctx.add_subdirs(relpath) - print 'Unknown RECURSE context class', ctxclass + print('Unknown RECURSE context class', ctxclass) raise Options.Handler.RECURSE = RECURSE Build.BuildContext.RECURSE = RECURSE -- cgit