diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-07 23:23:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-09 12:24:24 +0000 |
commit | 729b1d3afd3d4b8eed4a4f4ddeb27780db47dcd5 (patch) | |
tree | 91ce8c81e16f455aab46c8eac1586279ca57ac3b /meta/lib/oeqa/utils | |
parent | 220e40674b2b4bd3a04fc757d167757d124131c0 (diff) | |
download | poky-729b1d3afd3d4b8eed4a4f4ddeb27780db47dcd5.tar.gz |
qemurunner: Ensure logging handler is removed
If we don't remove the handler we end up with duplicate log messages
which is undesireable.
(From OE-Core rev: 4155a58aebe9c730be9ff1f68150f34d1cd472e5)
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 72f05d597f..aa2600b827 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -58,7 +58,8 @@ class QemuRunner: | |||
58 | self.host_dumper = HostDumper(dump_host_cmds, dump_dir) | 58 | self.host_dumper = HostDumper(dump_host_cmds, dump_dir) |
59 | 59 | ||
60 | self.logger = logging.getLogger("BitBake.QemuRunner") | 60 | self.logger = logging.getLogger("BitBake.QemuRunner") |
61 | self.logger.addHandler(logging.StreamHandler(sys.stdout)) | 61 | self.handler = logging.StreamHandler(sys.stdout) |
62 | self.logger.addHandler(self.handler) | ||
62 | 63 | ||
63 | def create_socket(self): | 64 | def create_socket(self): |
64 | try: | 65 | try: |
@@ -370,6 +371,7 @@ class QemuRunner: | |||
370 | self.ip = None | 371 | self.ip = None |
371 | if os.path.exists(self.qemu_pidfile): | 372 | if os.path.exists(self.qemu_pidfile): |
372 | os.remove(self.qemu_pidfile) | 373 | os.remove(self.qemu_pidfile) |
374 | self.logger.removeHandler(self.handler) | ||
373 | 375 | ||
374 | def stop_qemu_system(self): | 376 | def stop_qemu_system(self): |
375 | if self.qemupid: | 377 | if self.qemupid: |