summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-07 18:12:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-20 12:36:42 +0100
commit4f428303e02c37688018271210c5bdf7e3e4fc06 (patch)
tree5eafb09e2c7d176ab7e48f50c0f53181783ca0a7
parent0cbb70183472112e6d02a7822cc890aa47b4387e (diff)
downloadpoky-4f428303e02c37688018271210c5bdf7e3e4fc06.tar.gz
oeqa/qemurunner: Fix binary vs str issue
The recent logging changes for qemurunner showed up as errors on the autobuilder where decode couldn't be called on the returned string. Since the code returns binary data, return b'' instead of '' to match to avoid tracebacks. One of these cases was newly added, copied from the other which has been there for a long time, always broken. (From OE-Core rev: 8f24a7b35861b6aec39bc8d589e090ea9816732c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b8995b27db265b0a0b2d2ca595915f70f9f96e07) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 410789b815..09ef9fadb2 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -646,7 +646,7 @@ class LoggingThread(threading.Thread):
646 data = self.readsock.recv(count) 646 data = self.readsock.recv(count)
647 except socket.error as e: 647 except socket.error as e:
648 if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK: 648 if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK:
649 return '' 649 return b''
650 else: 650 else:
651 raise 651 raise
652 652
@@ -659,7 +659,7 @@ class LoggingThread(threading.Thread):
659 # until qemu exits. 659 # until qemu exits.
660 if not self.canexit: 660 if not self.canexit:
661 raise Exception("Console connection closed unexpectedly") 661 raise Exception("Console connection closed unexpectedly")
662 return '' 662 return b''
663 663
664 return data 664 return data
665 665