From 792d13d395266237d759467fe4fb514b415b12b1 Mon Sep 17 00:00:00 2001 From: Cruz Monrreal II Date: Fri, 25 Jan 2019 14:08:59 -0600 Subject: [PATCH] Added flag to run_cmd Popen invocation to do default decoding --- tools/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/utils.py b/tools/utils.py index fb8869c29c..ad5db06fdf 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -104,7 +104,8 @@ def run_cmd(command, work_dir=None, chroot=None, redirect=False): try: process = Popen(command, stdout=PIPE, - stderr=STDOUT if redirect else PIPE, cwd=work_dir) + stderr=STDOUT if redirect else PIPE, cwd=work_dir, + universal_newlines=True) _stdout, _stderr = process.communicate() except OSError: print("[OS ERROR] Command: "+(' '.join(command)))