From 7211e746b5d9aade28115733867631d476eddffe Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Sat, 20 Sep 2008 01:21:36 +0000 Subject: 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. --- 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 f1de15c..da02f12 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 -- cgit v0.12