Merge pull request #18 from raquel-ucl/asynch
Return access to the subprocess so output can be handled as desired
This commit is contained in:
commit
e2b7bd4686
1 changed files with 5 additions and 0 deletions
|
@ -290,6 +290,11 @@ class Terraform(object):
|
|||
|
||||
p = subprocess.Popen(cmds, stdout=stdout, stderr=stderr,
|
||||
cwd=working_folder, env=environ_vars)
|
||||
|
||||
synchronous = kwargs.pop('synchronous', True)
|
||||
if not synchronous:
|
||||
return p, None, None
|
||||
|
||||
out, err = p.communicate()
|
||||
ret_code = p.returncode
|
||||
log.debug('output: {o}'.format(o=out))
|
||||
|
|
Loading…
Reference in a new issue