From 6af468c642134c73c70820b17cad562c35785fdd Mon Sep 17 00:00:00 2001 From: Andrew Featherstone Date: Fri, 15 May 2015 21:02:10 +0100 Subject: Corrects comparison of actions from different environments. --- src/engine/SCons/Builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index c82f6ac..4e8aee9 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -292,8 +292,8 @@ def _node_errors(builder, env, tlist, slist): if t.has_explicit_builder(): if not t.env is None and not t.env is env: action = t.builder.action - t_contents = action.get_contents(tlist, slist, t.env) - contents = action.get_contents(tlist, slist, env) + t_contents = t.builder.action.get_contents(tlist, slist, t.env) + contents = builder.action.get_contents(tlist, slist, env) if t_contents == contents: msg = "Two different environments were specified for target %s,\n\tbut they appear to have the same action: %s" % (t, action.genstring(tlist, slist, t.env)) -- cgit v0.12 From 699440f601523b736d98cfef8f1bddcc2f184a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carn=C3=AB=20Draug?= Date: Sat, 26 Sep 2015 20:42:53 +0100 Subject: doc: do not recommend os.popen which is deprecated in python --- doc/user/tasks.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/user/tasks.xml b/doc/user/tasks.xml index 0bdf678..8026a53 100644 --- a/doc/user/tasks.xml +++ b/doc/user/tasks.xml @@ -96,8 +96,8 @@ filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions] The "backtick function": run a shell command and capture the output -import os -output = os.popen(command).read() +import subprocess +output = subprocess.check_output(command) -- cgit v0.12