Commit 2f7958e4 authored by Ehsan Azarnasab's avatar Ehsan Azarnasab

decode process output as latin-1 for Python3 to also work

parent fd75d43e
......@@ -128,6 +128,7 @@ def enqueue_output(out, queue):
def _log_buf(buf):
if not buf:
return
buf = buf.decode("latin-1")
buf = buf.rstrip()
lines = buf.splitlines()
for line in lines:
......@@ -158,7 +159,7 @@ def run_process(cmds, timeout=None):
try:
buf = q.get(timeout=.1)
except Empty:
buf = ''
buf = b''
_log_buf(buf)
elapsed = time.time() - _time
if timeout and elapsed > timeout:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment