]> code.ossystems Code Review - openembedded-core.git/commit
core/target/ssh.py: replace decode errors
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 22 Aug 2017 01:23:10 +0000 (18:23 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Aug 2017 13:12:39 +0000 (14:12 +0100)
commitd0d2f892f0bed6adb5ec6fb59d64efcc97c83e19
treeabe423e8a825184e03157ea07a29dd5fdbb8c4cd
parent320ea01f9eb33df462534bf08488ff6ada9bbe7b
core/target/ssh.py: replace decode errors

There might be wild strings when read from target (especially when
reading ptest results), replace the errors to avoid breaking the test.

Fixed: (Not always happen)
$ bitbake core-image-sato -ctestimage
[snip]
    status, output = self.target.run('ptest-runner', 0)
  File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 84, in run
    status, output = self._run(sshCmd, processTimeout, True)
  File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 55, in _run
    status, output = SSHCall(command, self.logger, timeout)
  File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 258, in SSHCall
    run()
  File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py", line 236, in run
    output = process.communicate()[0].decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 4906: invalid continuation byte

[YOCTO #11547]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/target/ssh.py