Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't load pastuids unless they are to be used

  • Loading branch information...
commit ab578c5e0a6d07534fc729cf70e8f7ce1e2ca703 1 parent 649290e
@AJenbo AJenbo authored
Showing with 13 additions and 13 deletions.
  1. +13 −13 isbg.py
View
26 isbg.py
@@ -361,19 +361,6 @@ def setpw(pw, hash):
f.write(hexof(setpw(imappassword, passwordhash)))
f.close()
-# pastuids keeps track of which uids we have already seen, so
-# that we don't analyze them multiple times. We store its
-# contents between sessions by saving into a file as Python
-# code (makes loading it here real easy since we just source
-# the file)
-pastuids=[]
-try:
- execfile(pastuidsfile)
-except:
- pass
-# remember what pastuids looked like so that we can compare at the end
-origpastuids=pastuids[:]
-
# Retrieve the entire message
def getmessage(uid, append_to=None):
res = imap.uid("FETCH", uid, "(RFC822)")
@@ -491,6 +478,19 @@ def assertok(res,*args):
# get the uids of all mails with a size less then the thresholdsize
typ, inboxuids = imap.uid("SEARCH", None, "SMALLER", thresholdsize)
inboxuids = inboxuids[0].split()
+
+ # pastuids keeps track of which uids we have already seen, so
+ # that we don't analyze them multiple times. We store its
+ # contents between sessions by saving into a file as Python
+ # code (makes loading it here real easy since we just source
+ # the file)
+ pastuids=[]
+ try:
+ execfile(pastuidsfile)
+ except:
+ pass
+ # remember what pastuids looked like so that we can compare at the end
+ origpastuids=pastuids[:]
# filter away uids that was previously scanned
uids = [u for u in inboxuids if u not in pastuids]
Please sign in to comment.
Something went wrong with that request. Please try again.