summaryrefslogtreecommitdiff
path: root/nose/plugins
diff options
context:
space:
mode:
authorMalthe Borch <mborch@gmail.com>2013-08-30 14:04:41 +0200
committerMalthe Borch <mborch@gmail.com>2014-02-12 17:09:09 +0100
commita22588c93f76746a2e7a973c6ade30349170353f (patch)
treec49762f39a94518acd55e2bb828f569e369739d6 /nose/plugins
parent7ce321f8cd98318edb889f1dc8ce7e3ab9a8c8a2 (diff)
downloadnose-a22588c93f76746a2e7a973c6ade30349170353f.tar.gz
Fixed issue with builtin filtering.
The superclass (which ultimately inherits from 'Handler') checks against any registered filters, before allowing a logging record. Nose's logging capture plugin should do the same, because these filters are allowed to modify the record. And it can easily happen that the logging format requires this modification (e.g. add an attribute).
Diffstat (limited to 'nose/plugins')
-rw-r--r--nose/plugins/logcapture.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nose/plugins/logcapture.py b/nose/plugins/logcapture.py
index 30b4a96..101b335 100644
--- a/nose/plugins/logcapture.py
+++ b/nose/plugins/logcapture.py
@@ -85,7 +85,8 @@ class MyMemoryHandler(Handler):
def truncate(self):
self.buffer = []
def filter(self, record):
- return self.filterset.allow(record.name)
+ if self.filterset.allow(record.name):
+ return Handler.filter(self, record)
def __getstate__(self):
state = self.__dict__.copy()
del state['lock']