Browse files

Don't try to adjust knownuids when in teachonly mode

  • Loading branch information...
1 parent cdf236c commit e66d8c831c126abfa945bde8dfd67e4b038d9857 @ook ook committed Nov 27, 2009
Showing with 18 additions and 17 deletions.
  1. +18 −17 isbg.py
View
35 isbg.py
@@ -594,23 +594,24 @@ def socket(self):
imap.logout()
del imap
-# Now tidy up lists of uids
-newpastuids=[]
-for i in pastuids:
- if i in alluids and i not in newpastuids:
- newpastuids.append(i)
-
-# only write out pastuids if it has changed
-if newpastuids!=origpastuids:
- f=open(pastuidsfile, "w+")
- try:
- os.chmod(pastuidsfile, 0600)
- except:
- pass
- f.write("pastuids=")
- f.write(`newpastuids`)
- f.write("\n")
- f.close()
+if not teachonly:
+ # Now tidy up lists of uids
+ newpastuids=[]
+ for i in pastuids:
+ if i in alluids and i not in newpastuids:
+ newpastuids.append(i)
+
+ # only write out pastuids if it has changed
+ if newpastuids!=origpastuids:
+ f=open(pastuidsfile, "w+")
+ try:
+ os.chmod(pastuidsfile, 0600)
+ except:
+ pass
+ f.write("pastuids=")
+ f.write(`newpastuids`)
+ f.write("\n")
+ f.close()
if stats:
if learnspambox:

0 comments on commit e66d8c8

Please sign in to comment.