From 7056a853da0121e5d1e3001e53aef1c787250755 Mon Sep 17 00:00:00 2001 From: Stephan Zaria Date: Mon, 10 Jun 2019 09:59:40 -0700 Subject: [PATCH] Move synchrounous pop uphill, so it doesn't end up as a flag in the actual terraform command --- python_terraform/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_terraform/__init__.py b/python_terraform/__init__.py index 4e0ff7d..2a9a094 100644 --- a/python_terraform/__init__.py +++ b/python_terraform/__init__.py @@ -272,6 +272,8 @@ class Terraform(object): """ capture_output = kwargs.pop('capture_output', True) raise_on_error = kwargs.pop('raise_on_error', False) + synchronous = kwargs.pop('synchronous', True) + if capture_output is True: stderr = subprocess.PIPE stdout = subprocess.PIPE @@ -291,7 +293,6 @@ 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