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-15 17:18:21 +0100
commit2f897b26bb7c3bacc41f7b3b108efd6e6a7e4968 (patch)
tree9147adde4219e0d19925a0ff2d741e7518623abc
parent6ad4febbcdb3e0024c888367f2af48a5222292f5 (diff)
downloadpoky-2f897b26bb7c3bacc41f7b3b108efd6e6a7e4968.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: 000feb98ff99e74d6118fc3f53330b8e975923d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b8995b27db265b0a0b2d2ca595915f70f9f96e07) Signed-off-by: Anuj Mittal <anuj.mittal@intel.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 84f7c5e76d..526b493669 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -650,7 +650,7 @@ class LoggingThread(threading.Thread):
650 data = self.readsock.recv(count) 650 data = self.readsock.recv(count)
651 except socket.error as e: 651 except socket.error as e:
652 if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK: 652 if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK:
653 return '' 653 return b''
654 else: 654 else:
655 raise 655 raise
656 656
@@ -663,7 +663,7 @@ class LoggingThread(threading.Thread):
663 # until qemu exits. 663 # until qemu exits.
664 if not self.canexit: 664 if not self.canexit:
665 raise Exception("Console connection closed unexpectedly") 665 raise Exception("Console connection closed unexpectedly")
666 return '' 666 return b''
667 667
668 return data 668 return data
669 669