From b66858565d0bd2443db6294ef194d23b13752df3 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 20 Sep 2008 01:21:36 +0000 Subject: [PATCH] Call str() on the string values of environment variables used by the _subproc(), so the underlying subprocess.Popen() call won't throw an exception if the value is actually a Unicode string. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3441 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Action.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index f1de15c9..da02f120 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -518,7 +518,9 @@ def _subproc(env, cmd, error = 'ignore', **kw): is_String = SCons.Util.is_String for key, value in ENV.items(): if is_String(value): - new_env[key] = value + # Call str() even though it's a "string" because it might be + # a *Unicode* string, which makes subprocess.Popen() gag. + new_env[key] = str(value) elif SCons.Util.is_List(value): # If the value is a list, then we assume it is a # path list, because that's a pretty common list-like -- 2.26.2