diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-25 10:33:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-25 23:19:53 +0000 |
commit | 7f98d0ffaf305fff5afb684f251d98a4cec61f23 (patch) | |
tree | 2e4aa6dd1426dd4796fbf06977a8cd713be02aec /meta/lib | |
parent | b82fd7552d92f48ff02b43282bae35d1d979d0fe (diff) | |
download | poky-7f98d0ffaf305fff5afb684f251d98a4cec61f23.tar.gz |
oeqa/qemurunner: Dont mix binary and non-binary strings
self.msg is a str(), bootlog is b'' so this code clearly doesn't work. Add
in a decode since its being used as a string.
(From OE-Core rev: e7546759d3102b576974bbab52594796f084721e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 7ef506b60a..49020c1e63 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -329,6 +329,7 @@ class QemuRunner: | |||
329 | self.logger.debug("Target didn't reach login banner in %d seconds (%s)" % | 329 | self.logger.debug("Target didn't reach login banner in %d seconds (%s)" % |
330 | (self.boottime, time.strftime("%D %H:%M:%S"))) | 330 | (self.boottime, time.strftime("%D %H:%M:%S"))) |
331 | tail = lambda l: "\n".join(l.splitlines()[-25:]) | 331 | tail = lambda l: "\n".join(l.splitlines()[-25:]) |
332 | bootlog = boolog.decode("utf-8") | ||
332 | # in case bootlog is empty, use tail qemu log store at self.msg | 333 | # in case bootlog is empty, use tail qemu log store at self.msg |
333 | lines = tail(bootlog if bootlog else self.msg) | 334 | lines = tail(bootlog if bootlog else self.msg) |
334 | self.logger.debug("Last 25 lines of text:\n%s" % lines) | 335 | self.logger.debug("Last 25 lines of text:\n%s" % lines) |