diff options
| author | Steven Knight <knight@baldmt.com> | 2008-09-20 01:21:36 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2008-09-20 01:21:36 (GMT) |
| commit | 7211e746b5d9aade28115733867631d476eddffe (patch) | |
| tree | e95260617fa3d0e01339a0e80899c00cd700dd8b /src/engine | |
| parent | 4c32c546aedd78e8f23508a3b4c1d58126598a96 (diff) | |
| download | SCons-7211e746b5d9aade28115733867631d476eddffe.zip SCons-7211e746b5d9aade28115733867631d476eddffe.tar.gz SCons-7211e746b5d9aade28115733867631d476eddffe.tar.bz2 | |
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.
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/SCons/Action.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
