Added flag to run_cmd Popen invocation to do default decoding

pull/9521/head
Cruz Monrreal II 2019-01-25 14:08:59 -06:00
parent e965aa6640
commit 72dbc52715
1 changed files with 2 additions and 1 deletions

View File

@ -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)))