Return a reference to the subprocess so output can be handled from elsewhere.

merge-requests/1/head
Raquel Alegre 7 years ago
parent 58c1146387
commit 0b2eb3b1be

@ -235,6 +235,11 @@ class Terraform(object):
p = subprocess.Popen(cmd_string, stdout=stdout, stderr=stderr, shell=True,
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…
Cancel
Save