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."""
16 logging.Handler.__init__(self)
17 self.detected_problems = 0
19 def emit(self, record):
20 """Increase number of warnings found"""
21 self.detected_problems += 1