From ecf879551965cb625aeca648754c6061707cb40b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 26 Aug 2021 15:00:19 +0200 Subject: qemurunner.py: handle getOutput() having nothing to read (From OE-Core rev: f4abfdeea175cfcadd6f73a69a676632ab4334a6) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/qemurunner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/lib') 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): -- cgit v1.2.3-54-g00ecf