From: Richard Purdie Date: Wed, 1 Jun 2016 12:27:25 +0000 (+0100) Subject: qemurunner: Use surrogateescape decoding X-Git-Tag: uninative-1.3~854 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=28a0030430d4cfcaf5dfc3e71bda07cdbfbbf4a7;p=openembedded-core.git qemurunner: Use surrogateescape decoding Since the stream can contain invalid binary characters (e.g. from ppc's bootloader) use surrogateescape decoding to ensure we do process the character stream, else it can hang/timeout. Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index e408fbbf3a..b8ac3f0bb6 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -234,7 +234,7 @@ class QemuRunner: data = data + sock.recv(1024) if data: try: - data = data.decode("utf-8") + data = data.decode("utf-8", errors="surrogateescape") bootlog += data data = b'' if re.search(".* login:", bootlog):