From 0b2eb3b1be8153ce4ea115ab7596df736c824b95 Mon Sep 17 00:00:00 2001 From: Raquel Alegre Date: Fri, 11 Aug 2017 19:00:06 +0100 Subject: [PATCH 1/2] Return a reference to the subprocess so output can be handled from elsewhere. --- python_terraform/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python_terraform/__init__.py b/python_terraform/__init__.py index 35c6e3b..144a735 100644 --- a/python_terraform/__init__.py +++ b/python_terraform/__init__.py @@ -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)) From da5e648e3f1a5c023ace20c1af5ceb6e904cd88e Mon Sep 17 00:00:00 2001 From: Raquel Alegre Date: Fri, 11 Aug 2017 19:00:22 +0100 Subject: [PATCH 2/2] Move version up. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 988cc76..a09f83b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ except IOError: setup( name=module_name, - version='0.8.6', + version='0.8.7', url='https://github.com/beelit94/python-terraform', license='MIT', author='Freddy Tan',