[Spambayes-checkins] spambayes imapfilter.py,1.15,1.16
Tim Stone
timstone4 at users.sourceforge.net
Thu Apr 17 13:54:14 EDT 2003
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv30858
Modified Files:
imapfilter.py
Log Message:
1. Corrected an error in the timed loop, that kept an imap session open while
the filter was sleeping
Index: imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/imapfilter.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** imapfilter.py 17 Apr 2003 15:47:20 -0000 1.15
--- imapfilter.py 17 Apr 2003 19:54:10 -0000 1.16
***************
*** 400,406 ****
sys.exit()
- imap = IMAPSession(options.imap_server, options.imap_port, \
- imapDebug)
-
if promptForPass:
pwd = getpass()
--- 400,403 ----
***************
*** 408,413 ****
pwd = options.imap_password
- imap.login(options.imap_username, pwd)
-
bdbname = os.path.expanduser(bdbname)
--- 405,408 ----
***************
*** 423,429 ****
--- 418,429 ----
print "Done."
+ imap = IMAPSession(options.imap_server, options.imap_port, \
+ imapDebug)
+
imap_filter = IMAPFilter(classifier, imapDebug)
while True:
+ imap.login(options.imap_username, pwd)
+
if doTrain:
if options.verbose:
***************
*** 435,442 ****
imap_filter.Filter()
if sleepTime:
time.sleep(sleepTime)
else:
break
-
- imap.logout(doExpunge)
--- 435,442 ----
imap_filter.Filter()
+ imap.logout(doExpunge)
+
if sleepTime:
time.sleep(sleepTime)
else:
break
More information about the Spambayes-checkins
mailing list