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-20 14:38:16 +0100 |
commit | 72ed2ca07227a0cc802a8ec1204f9cbdb51328fe (patch) | |
tree | 7b0e69fe54fcd1efbb22413c961d1de744ae263c /meta | |
parent | 130cad3803579ab3c24b6d0f0b78c5da9aa46cdb (diff) | |
download | poky-72ed2ca07227a0cc802a8ec1204f9cbdb51328fe.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: e4037c6911592700799d207ca8c3976afba18e25)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 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 = { |