projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e757609
)
Remove all other log handlers when capturing logs
author
Guido Günther
<agx@sigxcpu.org>
Mon, 28 Jul 2014 13:57:05 +0000
(15:57 +0200)
committer
Jun Wang
<junbill.wang@samsung.com>
Tue, 26 Jan 2016 15:31:21 +0000
(23:31 +0800)
This avoids spurious error messages during test runs.
tests/component/__init__.py
patch
|
blob
|
history
diff --git
a/tests/component/__init__.py
b/tests/component/__init__.py
index
31911e4
..
baabbbd
100644
(file)
--- a/
tests/component/__init__.py
+++ b/
tests/component/__init__.py
@@
-183,6
+183,8
@@
class ComponentTestBase(object):
self._loghandler = gbp.log.GbpStreamHandler(self._log, False)
self._loghandler.addFilter(gbp.log.GbpFilter([gbp.log.WARNING,
gbp.log.ERROR]))
+ for hdl in gbp.log.LOGGER.handlers:
+ gbp.log.LOGGER.removeHandler(hdl)
gbp.log.LOGGER.addHandler(self._loghandler)
elif self._log is not None:
gbp.log.LOGGER.removeHandler(self._loghandler)