aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/target/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/core/target/ssh.py')
-rw-r--r--meta/lib/oeqa/core/target/ssh.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index a2eafcd6f2a..927d659525b 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -6,6 +6,7 @@ import time
import select
import logging
import subprocess
+import codecs
from . import OETarget
@@ -206,12 +207,12 @@ def SSHCall(command, logger, timeout=None, **opts):
logger.debug('time: %s, endtime: %s' % (time.time(), endtime))
try:
if select.select([process.stdout], [], [], 5)[0] != []:
- data = os.read(process.stdout.fileno(), 1024)
+ reader = codecs.getreader('utf-8')(process.stdout)
+ data = reader.read(1024, 1024)
if not data:
process.stdout.close()
eof = True
else:
- data = data.decode("utf-8", errors='replace')
output += data
logger.debug('Partial data from SSH call: %s' % data)
endtime = time.time() + timeout