diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-29 17:42:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-06 14:41:28 +0000 |
commit | f93d5a469cb59927291303049576f3fad9f9f058 (patch) | |
tree | c66210036cf05ba12414222c2cc5d8c574a547ec /meta/lib/oeqa/utils | |
parent | 055695994ad4945a07a0866236257a999409c419 (diff) | |
download | poky-f93d5a469cb59927291303049576f3fad9f9f058.tar.gz |
oeqa/qemurunner: Fix cmdline variable use before reference
This avoids some tracebacks we've seen on failed autobuilder builds which would
allow the real error to be seen.
(From OE-Core rev: a4031935a7b8ea4f61b9020c1aa5598e186e7ad7)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index c025eb09c5..60e1cf8e08 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -242,8 +242,8 @@ class QemuRunner: | |||
242 | self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" % | 242 | self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" % |
243 | (time.time() - (endtime - self.runqemutime), | 243 | (time.time() - (endtime - self.runqemutime), |
244 | self.qemupid, time.strftime("%D %H:%M:%S"))) | 244 | self.qemupid, time.strftime("%D %H:%M:%S"))) |
245 | cmdline = '' | ||
245 | if get_ip: | 246 | if get_ip: |
246 | cmdline = '' | ||
247 | with open('/proc/%s/cmdline' % self.qemupid) as p: | 247 | with open('/proc/%s/cmdline' % self.qemupid) as p: |
248 | cmdline = p.read() | 248 | cmdline = p.read() |
249 | # It is needed to sanitize the data received | 249 | # It is needed to sanitize the data received |