summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-17 14:06:07 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-17 14:06:07 +0200
commit78d8a554c00bbfb6db25505c693f83e761034b00 (patch)
tree96aec10054ff64756fe31161412983d785ad8f94
parent6267939778fc94255ea0916b5cad97db3a27aec9 (diff)
downloadick-helpers-78d8a554c00bbfb6db25505c693f83e761034b00.tar.gz
always show captured stdout, stderr
-rw-r--r--ick_helpers.py7
1 files 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):