tests: fix CaptureStreamHandler on 2.6.

This commit is contained in:
David Wilson 2018-10-26 13:22:33 +01:00
parent 3429e57825
commit 592d6fc8d3
1 changed files with 2 additions and 2 deletions

View File

@ -160,12 +160,12 @@ def sync_with_broker(broker, timeout=10.0):
class CaptureStreamHandler(logging.StreamHandler):
def __init__(self, *args, **kwargs):
super(CaptureStreamHandler, self).__init__(*args, **kwargs)
logging.StreamHandler.__init__(self, *args, **kwargs)
self.msgs = []
def emit(self, msg):
self.msgs.append(msg)
return super(CaptureStreamHandler, self).emit(msg)
logging.StreamHandler.emit(self, msg)
class LogCapturer(object):