From 632b653b2b009ca7501423f4fc74af44aabf75d9 Mon Sep 17 00:00:00 2001 From: Michal Widera Date: Thu, 7 Nov 2019 11:00:59 +0100 Subject: [PATCH] Fix for subprocess call for Robot Framework execution This change modifies behavior of capture_output flag to work with robot framework. When set to given parameter it'll set stderr and stdout to None for subprocess command call. This fixes problem with error: "UnsupportedOperation: fileno" Signed-off-by: Michal Widera --- python_terraform/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_terraform/__init__.py b/python_terraform/__init__.py index 94fe2cf..33ab114 100644 --- a/python_terraform/__init__.py +++ b/python_terraform/__init__.py @@ -288,6 +288,9 @@ class Terraform(object): if capture_output is True: stderr = subprocess.PIPE stdout = subprocess.PIPE + elif capture_output == "framework": + stderr = None + stdout = None else: stderr = sys.stderr stdout = sys.stdout