[Spambayes-checkins] spambayes/Outlook2000 addin.py,1.128,1.129
Tony Meyer
anadelonbrin at users.sourceforge.net
Sun Jul 4 08:19:44 CEST 2004
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26368/Outlook2000
Modified Files:
addin.py
Log Message:
Add a time stamp to the logs - this would occasionally be useful in figuring out
how old the logs are.
Don't hook the spam folder unnecessarily. Fixes [ 933473 ] Unnecessary spam folder hook
No need for this to be backported, since there really isn't any harm. I've been running
with this change for a month and a half without problems, though, so it should be fine.
Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -d -r1.128 -r1.129
*** addin.py 4 Mar 2004 03:13:44 -0000 1.128
--- addin.py 4 Jul 2004 06:19:40 -0000 1.129
***************
*** 402,407 ****
self.manager.LogDebug(2, "OnItemAdd event for SPAM folder", self,
"with item", item.Subject.encode("mbcs", "ignore"))
! if not self.manager.config.training.train_manual_spam:
! return
# XXX - Theoretically we could get "not found" exception here,
# but we have never guarded for it, and never seen it. If it does
--- 402,407 ----
self.manager.LogDebug(2, "OnItemAdd event for SPAM folder", self,
"with item", item.Subject.encode("mbcs", "ignore"))
! assert(not self.manager.config.training.train_manual_spam,
! "The folder shouldn't be hooked if this is False")
# XXX - Theoretically we could get "not found" exception here,
# but we have never guarded for it, and never seen it. If it does
***************
*** 1205,1208 ****
--- 1205,1212 ----
(major, minor, spack, ver_str)
print "using Python", sys.version
+ from time import localtime
+ ltime = localtime()
+ print "Log created %s-%s-%s" % \
+ (ltime[0], ltime[1], ltime[2])
self.explorers_events = None # create at OnStartupComplete
***************
*** 1331,1335 ****
)
# For spam manually moved
! if config.spam_folder_id:
new_hooks.update(
self._HookFolderEvents([config.spam_folder_id],
--- 1335,1340 ----
)
# For spam manually moved
! if config.spam_folder_id and \
! self.manager.config.training.train_manual_spam:
new_hooks.update(
self._HookFolderEvents([config.spam_folder_id],
More information about the Spambayes-checkins
mailing list