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 Original file line Diff line number Diff line change
Expand Up @@ -594,23 +594,24 @@ def socket(self):
imap.logout() imap.logout()
del imap del imap


# Now tidy up lists of uids if not teachonly:
newpastuids=[] # Now tidy up lists of uids
for i in pastuids: newpastuids=[]
if i in alluids and i not in newpastuids: for i in pastuids:
newpastuids.append(i) if i in alluids and i not in newpastuids:

newpastuids.append(i)
# only write out pastuids if it has changed
if newpastuids!=origpastuids: # only write out pastuids if it has changed
f=open(pastuidsfile, "w+") if newpastuids!=origpastuids:
try: f=open(pastuidsfile, "w+")
os.chmod(pastuidsfile, 0600) try:
except: os.chmod(pastuidsfile, 0600)
pass except:
f.write("pastuids=") pass
f.write(`newpastuids`) f.write("pastuids=")
f.write("\n") f.write(`newpastuids`)
f.close() f.write("\n")
f.close()


if stats: if stats:
if learnspambox: if learnspambox:
Expand Down

0 comments on commit e66d8c8

Please sign in to comment.