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 11:49:13 +0000 |
commit | 4155a58aebe9c730be9ff1f68150f34d1cd472e5 (patch) | |
tree | a652a6636ff56d9fcde4a5da0ee8ad9fff92ba97 /meta/lib | |
parent | 28547cf01b5ebb81c525a2b982db9b04997d7c4f (diff) | |
download | openembedded-core-contrib-4155a58aebe9c730be9ff1f68150f34d1cd472e5.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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 72f05d597f6..aa2600b8270 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: |