diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-12 19:49:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-05-13 20:50:05 +0100 |
commit | 66ef365ba617e3f0dfb13d8711871b6628ed4465 (patch) | |
tree | 139449afe90b7e2c6b64695fe7eae7e6420a75aa /meta/lib | |
parent | 8e0c4eebab6a703f98ca32e07bf6a923e708d7a7 (diff) | |
download | poky-66ef365ba617e3f0dfb13d8711871b6628ed4465.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: b3bae8aba5b897c1afcc8bf4ad8929251812d2b5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/core/target/ssh.py | 4 |
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 cf3d44d12d..51032ef1a9 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py | |||
@@ -210,7 +210,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
210 | logger.debug('time: %s, endtime: %s' % (time.time(), endtime)) | 210 | logger.debug('time: %s, endtime: %s' % (time.time(), endtime)) |
211 | try: | 211 | try: |
212 | if select.select([process.stdout], [], [], 5)[0] != []: | 212 | if select.select([process.stdout], [], [], 5)[0] != []: |
213 | reader = codecs.getreader('utf-8')(process.stdout, 'surrogatepass') | 213 | reader = codecs.getreader('utf-8')(process.stdout, 'ignore') |
214 | data = reader.read(1024, 4096) | 214 | data = reader.read(1024, 4096) |
215 | if not data: | 215 | if not data: |
216 | process.stdout.close() | 216 | process.stdout.close() |
@@ -237,7 +237,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
237 | output += lastline | 237 | output += lastline |
238 | 238 | ||
239 | else: | 239 | else: |
240 | output = process.communicate()[0].decode("utf-8", errors='surrogatepass') | 240 | output = process.communicate()[0].decode('utf-8', errors='ignore') |
241 | logger.debug('Data from SSH call: %s' % output.rstrip()) | 241 | logger.debug('Data from SSH call: %s' % output.rstrip()) |
242 | 242 | ||
243 | options = { | 243 | options = { |