1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-06 14:49:50 +00:00

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: b8995b27db265b0a0b2d2ca595915f70f9f96e07)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2021-05-07 18:12:15 +01:00
parent 2dcd1f2a21
commit 4a3a0e7838
+2 -2
View File
@@ -724,7 +724,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
@@ -737,7 +737,7 @@ class LoggingThread(threading.Thread):
# until qemu exits.
if not self.canexit:
raise Exception("Console connection closed unexpectedly")
return ''
return b''
return data