2 restore-mail-inject.py - Tool to inject mails via IMAP
4 Copyright (c) 2012 Intra2net AG
8 class WarningsHandler(logging.Handler):
9 """This class iterates through the e-mail files."""
12 detected_problems = None
15 """Initialize a handler to count number of warnings."""
17 logging.Handler.__init__(self)
18 self.detected_problems = 0
20 def emit(self, record):
21 """Increase number of warnings found"""
23 self.detected_problems += 1