Skip to content

Commit 66bf0d8

Browse files
authored
Merge pull request kivy#1088 from inclement/fix_logger_py3_2
Moved logger bytes conversion to affect all lines
2 parents 86b8280 + d086280 commit 66bf0d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonforandroid/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ def shprint(command, *args, **kwargs):
173173
msg_width = columns - len(msg_hdr) - 1
174174
output = command(*args, **kwargs)
175175
for line in output:
176+
if isinstance(line, bytes):
177+
line = line.decode('utf-8', errors='replace')
176178
if logger.level > logging.DEBUG:
177-
if isinstance(line, bytes):
178-
line = line.decode('utf-8', errors='replace')
179179
msg = line.replace(
180180
'\n', ' ').replace(
181181
'\t', ' ').replace(

0 commit comments

Comments
 (0)