diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-07 18:12:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-09 23:30:14 +0100 |
commit | 4a3a0e7838f36fd1d5b8b54c69b92fc376938fcc (patch) | |
tree | a261745c2114345fbe617608d7979ef9223598a9 /meta/lib/oeqa/utils/qemurunner.py | |
parent | 2dcd1f2a21ab430c08a27d95e6ea9cddfe88ec30 (diff) | |
download | poky-4a3a0e7838f36fd1d5b8b54c69b92fc376938fcc.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: b8995b27db265b0a0b2d2ca595915f70f9f96e07)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 69fee27511..899152c7ad 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -724,7 +724,7 @@ class LoggingThread(threading.Thread): | |||
724 | data = self.readsock.recv(count) | 724 | data = self.readsock.recv(count) |
725 | except socket.error as e: | 725 | except socket.error as e: |
726 | if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK: | 726 | if e.errno == errno.EAGAIN or e.errno == errno.EWOULDBLOCK: |
727 | return '' | 727 | return b'' |
728 | else: | 728 | else: |
729 | raise | 729 | raise |
730 | 730 | ||
@@ -737,7 +737,7 @@ class LoggingThread(threading.Thread): | |||
737 | # until qemu exits. | 737 | # until qemu exits. |
738 | if not self.canexit: | 738 | if not self.canexit: |
739 | raise Exception("Console connection closed unexpectedly") | 739 | raise Exception("Console connection closed unexpectedly") |
740 | return '' | 740 | return b'' |
741 | 741 | ||
742 | return data | 742 | return data |
743 | 743 | ||