<div dir="ltr">Please apply both. I think this was the only bad issue with rc2 on CentOS 7 or 8.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 18, 2024 at 10:09 PM <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>><br>
<br>
---<br>
rtemstoolkit/execute.py | 12 ++++++++++--<br>
1 file changed, 10 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/rtemstoolkit/execute.py b/rtemstoolkit/execute.py<br>
index 31d3a8a..c7d8134 100755<br>
--- a/rtemstoolkit/execute.py<br>
+++ b/rtemstoolkit/execute.py<br>
@@ -37,6 +37,7 @@<br>
from __future__ import print_function<br>
<br>
import functools<br>
+import codecs<br>
import io<br>
import os<br>
import re<br>
@@ -203,6 +204,10 @@ class execute(object):<br>
stacktraces.trace()<br>
if trace_threads:<br>
print('execute:_readthread: start')<br>
+ if sys.stdout.encoding is not None:<br>
+ decoder = codecs.getincrementaldecoder(sys.stdout.encoding)()<br>
+ else:<br>
+ decoder = None<br>
count = 0<br>
line = ''<br>
try:<br>
@@ -222,8 +227,8 @@ class execute(object):<br>
_output_line(line + '\n', exe, prefix, out, count)<br>
break<br>
# str and bytes are the same type in Python2<br>
- if type(data) is not str and type(data) is bytes:<br>
- data = data.decode(sys.stdout.encoding)<br>
+ if decoder is not None and type(data) is not str and type(data) is bytes:<br>
+ data = decoder.decode(data)<br>
last_ch = data[-1]<br>
sd = (line + data).split('\n')<br>
if last_ch != '\n':<br>
@@ -382,6 +387,9 @@ class execute(object):<br>
if self.verbose:<br>
log.output(what + ': ' + cs)<br>
log.trace('exe: %s' % (cs))<br>
+ if shell and self.shell_exe:<br>
+ command = arg_list(command)<br>
+ command[:0] = self.shell_exe<br>
if not stdin and self.input:<br>
stdin = subprocess.PIPE<br>
if not stdout:<br>
-- <br>
2.39.3 (Apple Git-146)<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>