Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Don't try to adjust knownuids when in teachonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ook committed Nov 27, 2009
1 parent cdf236c commit e66d8c8
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions isbg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e66d8c8

Please sign in to comment.