From: GregNoel Date: Sat, 6 Dec 2008 01:13:18 +0000 (+0000) Subject: Issue 2267, fix use of uninitialized variable X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7cb34b2c80921b96708e7182eaf824e642e7700a;p=scons.git Issue 2267, fix use of uninitialized variable git-svn-id: http://scons.tigris.org/svn/scons/trunk@3807 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index 6ce51168..bc1d7240 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -504,12 +504,12 @@ class _ActionAction(ActionBase): l = string.join(self.presub_lines(env), '\n ') out = "Building %s with action:\n %s\n" % (t, l) sys.stdout.write(out) - s = None + cmd = None if show and self.strfunction: - s = self.strfunction(target, source, env) - if s: + cmd = self.strfunction(target, source, env) + if cmd: if chdir: - s = ('os.chdir(%s)\n' % repr(chdir)) + s + cmd = ('os.chdir(%s)\n' % repr(chdir)) + cmd try: get = env.get except AttributeError: @@ -518,7 +518,7 @@ class _ActionAction(ActionBase): print_func = get('PRINT_CMD_LINE_FUNC') if not print_func: print_func = self.print_cmd_line - print_func(s, target, source, env) + print_func(cmd, target, source, env) stat = 0 if execute: if chdir: @@ -536,7 +536,7 @@ class _ActionAction(ActionBase): finally: if save_cwd: os.chdir(save_cwd) - if s and save_cwd: + if cmd and save_cwd: print_func('os.chdir(%s)' % repr(save_cwd), target, source, env) return stat