Merge pull request #856 from Draqun/master

Fix for bug when logcat value which cannot be decode to utf-8
This commit is contained in:
Gabriel Pettier 2019-03-13 22:52:37 +01:00 committed by GitHub
commit 06a964dbe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,7 +328,7 @@ class Buildozer(object):
ret_stdout.append(chunk) ret_stdout.append(chunk)
if show_output: if show_output:
if IS_PY3: if IS_PY3:
stderr.write(chunk.decode('utf-8')) stderr.write(chunk.decode('utf-8', 'replace'))
else: else:
stdout.write(chunk) stdout.write(chunk)
if fd_stderr in readx: if fd_stderr in readx:
@ -339,7 +339,7 @@ class Buildozer(object):
ret_stderr.append(chunk) ret_stderr.append(chunk)
if show_output: if show_output:
if IS_PY3: if IS_PY3:
stderr.write(chunk.decode('utf-8')) stderr.write(chunk.decode('utf-8', 'replace'))
else: else:
stderr.write(chunk) stderr.write(chunk)