[Spambayes-checkins] spambayes Corpus.py,1.7,1.8
Richie Hindle
richiehindle at users.sourceforge.net
Sun Jan 5 14:26:23 EST 2003
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv28160
Modified Files:
Corpus.py
Log Message:
Hack around a nasty problem in Corpus whereby the web training
interface would crash when there were more than 250 messages
in the list. A real fix is pending, just as soon as work out what it
should be...
Index: Corpus.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Corpus.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Corpus.py 6 Dec 2002 12:56:51 -0000 1.7
--- Corpus.py 5 Jan 2003 22:26:20 -0000 1.8
***************
*** 184,188 ****
--- 184,193 ----
'''Move a Message from another corpus to this corpus'''
+ # XXX Hack: Calling msg.getSubstance() here ensures that the
+ # message substance is in memory. If it isn't, when addMessage()
+ # calls message.store(), which calls message.getSubstance(), that
+ # will try to load the substance from the as-yet-unwritten new file.
msg = fromcorpus[key]
+ msg.getSubstance()
fromcorpus.removeMessage(msg)
self.addMessage(msg)
More information about the Spambayes-checkins
mailing list