summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-08-26 15:00:19 +0200
committerSteve Sakoman <steve@sakoman.com>2021-08-27 04:58:08 -1000
commit6f3a8e259ecf6934b32a264661422a6872aca2ef (patch)
tree3dc57d32b23d50259c2f6e945bc81167f1f49b7e
parent1732290d4d2147bd9ffd76deaf90650519a6ad3d (diff)
downloadopenembedded-core-contrib-6f3a8e259ecf6934b32a264661422a6872aca2ef.tar.gz
qemurunner.py: handle getOutput() having nothing to read
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f4abfdeea175cfcadd6f73a69a676632ab4334a6) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index a9efb849d9..f7e5a3b3a6 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -120,7 +120,10 @@ class QemuRunner:
import fcntl
fl = fcntl.fcntl(o, fcntl.F_GETFL)
fcntl.fcntl(o, fcntl.F_SETFL, fl | os.O_NONBLOCK)
- return os.read(o.fileno(), 1000000).decode("utf-8")
+ try:
+ return os.read(o.fileno(), 1000000).decode("utf-8")
+ except BlockingIOError:
+ return ""
def handleSIGCHLD(self, signum, frame):