]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/qemurunner: Dont mix binary and non-binary strings
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Mar 2019 10:33:21 +0000 (10:33 +0000)
committerArmin Kuster <akuster808@gmail.com>
Sat, 18 May 2019 04:18:44 +0000 (21:18 -0700)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oeqa/utils/qemurunner.py

index cc95dc2990e131593cd015346cd91f54b9645666..5d1d0cceca8d12df6e66b7272a39811913952e9d 100644 (file)
@@ -320,6 +320,7 @@ class QemuRunner:
                 self.logger.debug("Target didn't reach login banner in %d seconds (%s)" %
                                   (self.boottime, time.strftime("%D %H:%M:%S")))
             tail = lambda l: "\n".join(l.splitlines()[-25:])
+            bootlog = boolog.decode("utf-8")
             # in case bootlog is empty, use tail qemu log store at self.msg
             lines = tail(bootlog if bootlog else self.msg)
             self.logger.debug("Last 25 lines of text:\n%s" % lines)