[Spambayes-checkins] spambayes/Outlook2000 manager.py,1.58,1.59
Mark Hammond
mhammond at users.sourceforge.net
Tue Jun 3 20:46:50 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv3588
Modified Files:
manager.py
Log Message:
Don't save the config as part of a general "manager.Save()" - config is now
saved explicitly after the dialog closes, and this prevents us writing the
config pickle at shutdown and various other times.
Index: manager.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/manager.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** manager.py 16 May 2003 03:50:56 -0000 1.58
--- manager.py 4 Jun 2003 02:46:47 -0000 1.59
***************
*** 485,492 ****
self.config._dump()
print " ->", self.config_filename
SavePickle(self.config, self.config_filename)
def Save(self):
! self.SaveConfig()
if self.bayes_dirty:
self.SaveBayes()
--- 485,495 ----
self.config._dump()
print " ->", self.config_filename
+ assert self.config, "Have no config to save!"
SavePickle(self.config, self.config_filename)
def Save(self):
! # No longer save the config here - do it explicitly when changing it
! # (prevents lots of extra pickle writes, for no good reason. Other
! # alternative is a dirty flag for config - this is simpler)
if self.bayes_dirty:
self.SaveBayes()
More information about the Spambayes-checkins
mailing list