Skip to content

Commit 86b8280

Browse files
authored
Merge pull request kivy#1087 from inclement/fix_logger_py3
Made logger convert output to utf-8 including errors
2 parents 96098ce + cee7718 commit 86b8280

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pythonforandroid/logger.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ def shprint(command, *args, **kwargs):
174174
output = command(*args, **kwargs)
175175
for line in output:
176176
if logger.level > logging.DEBUG:
177+
if isinstance(line, bytes):
178+
line = line.decode('utf-8', errors='replace')
177179
msg = line.replace(
178180
'\n', ' ').replace(
179181
'\t', ' ').replace(

0 commit comments

Comments
 (0)