diff options
Diffstat (limited to 'SCons/Action.py')
-rw-r--r-- | SCons/Action.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/SCons/Action.py b/SCons/Action.py index 81dc033..0110299 100644 --- a/SCons/Action.py +++ b/SCons/Action.py @@ -799,25 +799,25 @@ def _subproc(scons_env, cmd, error='ignore', **kw): if error == 'raise': raise # return a dummy Popen instance that only returns error class dummyPopen: - def __init__(self, e): + def __init__(self, e): self.exception = e # Add the following two to enable using the return value as a context manager - # for example + # for example # with Action._subproc(...) as po: # logic here which uses po - def __enter__(self): + def __enter__(self): return self - def __exit__(self, *args): + def __exit__(self, *args): pass - def communicate(self, input=None): + def communicate(self, input=None): return ('', '') - def wait(self): + def wait(self): return -self.exception.errno - + stdin = None class f: def read(self): return '' @@ -924,7 +924,7 @@ class CommandAction(_ActionAction): escape = env.get('ESCAPE', lambda x: x) - ENV = get_default_ENV(env) + ENV = env.get('SHELL_ENV_EXPANDER', get_default_ENV)(env) # Ensure that the ENV values are all strings: for key, value in ENV.items(): |