Convert stdout and stderr to UTF-8 properly in the run_cmd helper.
This commit is contained in:
parent
870c136469
commit
3e8941cdde
@ -39,8 +39,8 @@ def run_cmd(cmd, stdin_data=None):
|
|||||||
# Read stdout and stderr otherwise if the PIPE buffer is full, we might
|
# Read stdout and stderr otherwise if the PIPE buffer is full, we might
|
||||||
# wait for ever…
|
# wait for ever…
|
||||||
while p.poll() is None:
|
while p.poll() is None:
|
||||||
stdout += str(p.stdout.read())
|
stdout += p.stdout.read().decode('utf-8')
|
||||||
stderr += str(p.stderr.read())
|
stderr += p.stderr.read().decode('utf-8')
|
||||||
return p.returncode, stdout, stderr
|
return p.returncode, stdout, stderr
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user