[oe-commits] [openembedded-core] 67/122: qemurunner: Ensure logging handler is removed
git at git.openembedded.org
git at git.openembedded.org
Mon Dec 4 17:25:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch rocko
in repository openembedded-core.
commit 39e6194615b139e2b772084641940fffa2c9380f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Nov 7 23:23:54 2017 +0000
qemurunner: Ensure logging handler is removed
If we don't remove the handler we end up with duplicate log messages
which is undesireable.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster at mvista.com>
---
meta/lib/oeqa/utils/qemurunner.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 72f05d5..aa2600b 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -58,7 +58,8 @@ class QemuRunner:
self.host_dumper = HostDumper(dump_host_cmds, dump_dir)
self.logger = logging.getLogger("BitBake.QemuRunner")
- self.logger.addHandler(logging.StreamHandler(sys.stdout))
+ self.handler = logging.StreamHandler(sys.stdout)
+ self.logger.addHandler(self.handler)
def create_socket(self):
try:
@@ -370,6 +371,7 @@ class QemuRunner:
self.ip = None
if os.path.exists(self.qemu_pidfile):
os.remove(self.qemu_pidfile)
+ self.logger.removeHandler(self.handler)
def stop_qemu_system(self):
if self.qemupid:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list