Add mmassive e-mail update for performance by using message set STORE command
[imap-mark-seen] / warnings_handler.py
CommitLineData
87758662 1'''
7c7f439f 2imap-mark-seen.py - Tool to mark all e-mails as seen
87758662
PD
3
4Copyright (c) 2012 Intra2net AG
5Author: Plamen Dimitrov and Thomas Jarosch
87758662
PD
6'''
7import logging
8
9class WarningsHandler(logging.Handler):
10 """This class iterates through the e-mail files."""
11
12 # class attributes
13 detected_problems = None
14
15 def __init__(self):
16 """Initialize a handler to count number of warnings."""
17
18 logging.Handler.__init__(self)
19 self.detected_problems = 0
20
21 def emit(self, record):
22 """Increase number of warnings found"""
87758662 23 self.detected_problems += 1