[Spambayes-checkins] spambayes mboxtrain.py,1.7,1.8

Tony Meyer anadelonbrin at users.sourceforge.net
Thu Jul 3 22:43:32 EDT 2003


Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv24739

Modified Files:
	mboxtrain.py 
Log Message:
The order of the elif statements meant that one would never
execute (should be most specific to most general and it was not).

Fixes [spambayes-dev] [ spambayes-Bugs-761677 ]
mboxtrain.py's -n optionhas no effect

Index: mboxtrain.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/mboxtrain.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** mboxtrain.py	13 Apr 2003 22:24:24 -0000	1.7
--- mboxtrain.py	4 Jul 2003 04:43:30 -0000	1.8
***************
*** 213,220 ****
      elif os.path.isfile(path):
          mbox_train(h, path, is_spam, force)
-     elif os.path.isdir(os.path.join(path, "cur")):
-         maildir_train(h, os.path.join(path, "cur"), is_spam, force)
      elif trainnew and os.path.isdir(os.path.join(path, "new")):
          maildir_train(h, os.path.join(path, "new"), is_spam, force)
      elif os.path.isdir(path):
          mhdir_train(h, path, is_spam, force)
--- 213,220 ----
      elif os.path.isfile(path):
          mbox_train(h, path, is_spam, force)
      elif trainnew and os.path.isdir(os.path.join(path, "new")):
          maildir_train(h, os.path.join(path, "new"), is_spam, force)
+     elif os.path.isdir(os.path.join(path, "cur")):
+         maildir_train(h, os.path.join(path, "cur"), is_spam, force)
      elif os.path.isdir(path):
          mhdir_train(h, path, is_spam, force)





More information about the Spambayes-checkins mailing list