[Spambayes-checkins] spambayes/spambayes message.py,1.72,1.73
Tony Meyer
anadelonbrin at users.sourceforge.net
Mon Nov 28 03:08:10 CET 2005
Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23239/spambayes
Modified Files:
message.py
Log Message:
Add ability for messageinfo class property to be reloaded.
Fix the fix for stats to work.
Index: message.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** message.py 28 Nov 2005 00:07:03 -0000 1.72
--- message.py 28 Nov 2005 02:08:03 -0000 1.73
***************
*** 125,129 ****
def __len__(self):
! return len(self.db)
def get_statistics_start_date(self):
--- 125,129 ----
def __len__(self):
! return len(self.keys())
def get_statistics_start_date(self):
***************
*** 283,291 ****
storage.ZODBClassifier.__init__(self, db_name)
self.classifier.store = self.store
def __setattr__(self, att, value):
# Override ZODBClassifier.__setattr__
object.__setattr__(self, att, value)
- def keys(self):
- return self.classifier.keys()
--- 283,290 ----
storage.ZODBClassifier.__init__(self, db_name)
self.classifier.store = self.store
+ self.db = self.classifier
def __setattr__(self, att, value):
# Override ZODBClassifier.__setattr__
object.__setattr__(self, att, value)
***************
*** 364,367 ****
--- 363,369 ----
self._set_class_message_info_db(value)
message_info_db = property(_get_message_info_db, _set_message_info_db)
+ def _reload_message_info_db(klass):
+ klass._message_info_db = None
+ reload_message_info_db = classmethod(_reload_message_info_db)
# This function (and it's hackishness) can be avoided by using
More information about the Spambayes-checkins
mailing list