From cdaedd0a9482754a803bce6a1901c7ab8903c9df Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 17 Mar 2021 14:11:15 +0200 Subject: always capture output --- ick_helpers.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ick_helpers.py b/ick_helpers.py index d5bbdd3..74d5fb6 100644 --- a/ick_helpers.py +++ b/ick_helpers.py @@ -37,10 +37,7 @@ class Exec: kwargs["cwd"] = self.dirname if "check" not in kwargs: kwargs["check"] = True - if "stdout" not in kwargs: - kwargs["stdout"] = subprocess.PIPE - if "stderr" not in kwargs: - kwargs["stderr"] = subprocess.STDOUT + kwargs["capture_output"] = True debug("RUN:", args, kwargs) x = subprocess.run(args, **kwargs) @@ -54,14 +51,12 @@ class Exec: # Run a command, capture its stdout. Fail on non-zero exit. kwargs["check"] = True - kwargs["stdout"] = subprocess.PIPE x = self.run(*args, **kwargs) return x.stdout.decode("UTF-8") def run_silently(self, *args, **kwargs): # Run a command, don't capture output. Return exit code. - kwargs["stdout"] = kwargs["stderr"] = subprocess.DEVNULL kwargs["check"] = False return self.run(*args, **kwargs) -- cgit v1.2.1