From 78d8a554c00bbfb6db25505c693f83e761034b00 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 17 Mar 2021 14:06:07 +0200 Subject: always show captured stdout, stderr --- ick_helpers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ick_helpers.py b/ick_helpers.py index 9651060..d5bbdd3 100644 --- a/ick_helpers.py +++ b/ick_helpers.py @@ -44,9 +44,10 @@ class Exec: debug("RUN:", args, kwargs) x = subprocess.run(args, **kwargs) - if kwargs["stdout"] == subprocess.PIPE: - if x.stdout: - sys.stdout.write(x.stdout.decode("UTF-8")) + if x.stdout: + sys.stdout.write("STDOUT:\n%s" % x.stdout.decode("UTF-8")) + if x.stderr: + sys.stdout.write("STDERR:\n%s" % x.stderr.decode("UTF-8")) return x def get_stdout(self, *args, **kwargs): -- cgit v1.2.1