From 31f90b0a60f8bf057e7d7fb4182548e68e430cc8 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Thu, 5 Jul 2012 10:47:37 +0200 Subject: [PATCH] Store statistics in 'statistics.txt' --- src/caching_data.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) 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: -- 1.7.1