Added flag to run_cmd Popen invocation to do default decoding

pull/9646/head
Cruz Monrreal II 2019-01-25 14:08:59 -06:00 committed by adbridge
parent 755931de72
commit 792d13d395
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)))