mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
decode process output as latin-1 for Python3 to also work
This commit is contained in:
parent
fd75d43efb
commit
2f7958e4f9
3
setup.py
3
setup.py
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user