]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/qemurunner: Fix cmdline variable use before reference
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Nov 2019 17:42:48 +0000 (17:42 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Dec 2019 20:35:27 +0000 (20:35 +0000)
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@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index c025eb09c5f9e9a6947bbf9f125a089cb5a1f03e..60e1cf8e08ebaa1bc94841fc4fd6da8b09d32e51 100644 (file)
@@ -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