mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
parent
cfed1659a2
commit
e04c84191b
@ -182,7 +182,10 @@ class execute(object):
|
|||||||
|
|
||||||
if trace_threads:
|
if trace_threads:
|
||||||
print('execute:_readthread: start')
|
print('execute:_readthread: start')
|
||||||
decoder = codecs.getincrementaldecoder(sys.stdout.encoding)()
|
if sys.stdout.encoding is not None:
|
||||||
|
decoder = codecs.getincrementaldecoder(sys.stdout.encoding)()
|
||||||
|
else:
|
||||||
|
decoder = None
|
||||||
count = 0
|
count = 0
|
||||||
line = ''
|
line = ''
|
||||||
try:
|
try:
|
||||||
@ -202,7 +205,7 @@ class execute(object):
|
|||||||
_output_line(line + '\n', exe, prefix, out, count)
|
_output_line(line + '\n', exe, prefix, out, count)
|
||||||
break
|
break
|
||||||
# str and bytes are the same type in Python2
|
# str and bytes are the same type in Python2
|
||||||
if type(data) is not str and type(data) is bytes:
|
if decoder is not None and type(data) is not str and type(data) is bytes:
|
||||||
data = decoder.decode(data)
|
data = decoder.decode(data)
|
||||||
last_ch = data[-1]
|
last_ch = data[-1]
|
||||||
sd = (line + data).split('\n')
|
sd = (line + data).split('\n')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user