Store statistics in 'statistics.txt'
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 5 Jul 2012 08:47:37 +0000 (10:47 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 5 Jul 2012 08:47:37 +0000 (10:47 +0200)
src/caching_data.py

index c3a614c..ab3e4ad 100644 (file)
@@ -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: