From: Richard Purdie Date: Wed, 28 Nov 2018 13:00:11 +0000 (+0000) Subject: oeqa/utils/commands: Avoid log message duplication X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~16011 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=532984708436bdfa3a8cac2c684a425eb249bad0;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index e6a35d3d259..2e6a2289cd9 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -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): """