summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-12 19:49:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-22 00:31:49 +0100
commitafb311001c6a8f911fd8b794afced0cb7808ac82 (patch)
tree26334daee551630aaaf1d7f4bc8d4fce452111fa /meta
parent29e2a3f5e8fc56bd298a2d3d2ff66422c2911712 (diff)
downloadpoky-afb311001c6a8f911fd8b794afced0cb7808ac82.tar.gz
oeqa/target/ssh: Replace suggogatepass with ignoring errors
We continued to see encoding problems with ssh commands run in oeqa. After much research the conclusion was we should use ignore the errors since some occasional bad locale encoding is better than the unicode decoding issues we were seeing which crashed large parts of tests. (From OE-Core rev: cf4d3230ac439118a2ad3c381bac38e11b3e14e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/core/target/ssh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 2adbb3000c..0c09ddf518 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -207,7 +207,7 @@ def SSHCall(command, logger, timeout=None, **opts):
207 logger.debug('time: %s, endtime: %s' % (time.time(), endtime)) 207 logger.debug('time: %s, endtime: %s' % (time.time(), endtime))
208 try: 208 try:
209 if select.select([process.stdout], [], [], 5)[0] != []: 209 if select.select([process.stdout], [], [], 5)[0] != []:
210 reader = codecs.getreader('utf-8')(process.stdout, 'surrogatepass') 210 reader = codecs.getreader('utf-8')(process.stdout, 'ignore')
211 data = reader.read(1024, 4096) 211 data = reader.read(1024, 4096)
212 if not data: 212 if not data:
213 process.stdout.close() 213 process.stdout.close()
@@ -234,7 +234,7 @@ def SSHCall(command, logger, timeout=None, **opts):
234 output += lastline 234 output += lastline
235 235
236 else: 236 else:
237 output = process.communicate()[0].decode("utf-8", errors='surrogatepass') 237 output = process.communicate()[0].decode('utf-8', errors='ignore')
238 logger.debug('Data from SSH call: %s' % output.rstrip()) 238 logger.debug('Data from SSH call: %s' % output.rstrip())
239 239
240 options = { 240 options = {