From: Thomas Jarosch Date: Thu, 5 Jul 2012 08:47:37 +0000 (+0200) Subject: Store statistics in 'statistics.txt' X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=31f90b0a60f8bf057e7d7fb4182548e68e430cc8;p=imap-fix-internaldate Store statistics in 'statistics.txt' --- diff --git a/src/caching_data.py b/src/caching_data.py index c3a614c..ab3e4ad 100644 --- a/src/caching_data.py +++ b/src/caching_data.py @@ -21,6 +21,7 @@ from mailbox_state import MailboxState CACHE_FILENAME = "message_cache.dat" CACHE_VERSION = "1" +STATISTICS_FILENAME = "statistics.txt" class CachingData: """This class is responsible for the caching of data.""" @@ -111,10 +112,10 @@ class CachingData: self.data[user][box_key] = MailboxState(name, uidvalidity, user) logging.debug("New mailbox %s cached.", box_key) return self.data[user][box_key] - + def report_conflicts(self): """Write a date conflicts report in a file.""" - with open("conflict_stats.txt", 'w') as statsfile: + with open(STATISTICS_FILENAME, 'w') as statsfile: owner_total_conflicts = {} owner_total_missing = {} for user in self.data: