[OE-core] [PATCH] oeqa/qemurunner: Fix cmdline variable use before reference
Richard Purdie
richard.purdie at linuxfoundation.org
Wed Dec 4 12:32:20 UTC 2019
This avoids some tracebacks we've seen on failed autobuilder builds which would
allow the real error to be seen.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/utils/qemurunner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index c025eb09c5f..60e1cf8e08e 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -242,8 +242,8 @@ class QemuRunner:
self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" %
(time.time() - (endtime - self.runqemutime),
self.qemupid, time.strftime("%D %H:%M:%S")))
+ cmdline = ''
if get_ip:
- cmdline = ''
with open('/proc/%s/cmdline' % self.qemupid) as p:
cmdline = p.read()
# It is needed to sanitize the data received
--
2.20.1
More information about the Openembedded-core
mailing list