summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-08-26 15:00:19 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-27 11:53:23 +0100
commitf4abfdeea175cfcadd6f73a69a676632ab4334a6 (patch)
tree688c0ac94b90ea6336c5748e7b2430526e6c9c46
parent6e2bf68e4401db747484c2c8ba0f77500b1d2d49 (diff)
downloadopenembedded-core-f4abfdeea175cfcadd6f73a69a676632ab4334a6.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>
-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 204ad8b918..d55248c497 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -123,7 +123,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):