oeqa/utils/commands: Avoid log message duplication

Each time a runqemu() fails, the log handler would be left behind meaning
messages from any subsequent run would be duplicated (or worse/more).

This ensures we remove the handler regardless and means we no longer
have the duplication.

(From OE-Core rev: 532984708436bdfa3a8cac2c684a425eb249bad0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie committed 2018-12-01 11:38:36 +00:00
1 parent f33fb239d6
commit ce17f3b679
1 file changed
+1 -1
+1 -1
View File
@@ -345,11 +345,11 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None,
yield qemu
finally:
targetlogger.removeHandler(handler)
try:
qemu.stop()
except:
pass
targetlogger.removeHandler(handler)
def updateEnv(env_file):
"""