]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
qemurunner.py: handle getOutput() having nothing to read
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 26 Aug 2021 13:00:19 +0000 (15:00 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 Aug 2021 10:53:23 +0000 (11:53 +0100)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index 204ad8b918c0b3e541c7d088388919801e87f6a9..d55248c497e29d0f8f3ce4ace9c7c586462e2c4d 100644 (file)
@@ -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):