forked from extern/easydiffusion
Convert bytes to str in the output of run
This commit is contained in:
parent
a6913dfe29
commit
3cf7a984fd
@ -20,6 +20,9 @@ def run(cmd, run_in_folder=None, env=None, get_output=False, log_the_cmd=False):
|
|||||||
|
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
|
|
||||||
|
out = out.decode('utf-8') if isinstance(out, bytes) else out
|
||||||
|
err = err.decode('utf-8') if isinstance(out, bytes) else err
|
||||||
|
|
||||||
if get_output:
|
if get_output:
|
||||||
return out, err
|
return out, err
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user