From 8f24a7b35861b6aec39bc8d589e090ea9816732c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 7 May 2021 18:12:15 +0100 Subject: [PATCH] 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. Signed-off-by: Richard Purdie (cherry picked from commit b8995b27db265b0a0b2d2ca595915f70f9f96e07) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/utils/qemurunner.py | 4 ++-- 1 file 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): data = self.readsock.recv(count) except socket.error as e: if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK: - return '' + return b'' else: raise @@ -659,7 +659,7 @@ class LoggingThread(threading.Thread): # until qemu exits. if not self.canexit: raise Exception("Console connection closed unexpectedly") - return '' + return b'' return data -- 2.40.1