opstatus.stored += 1
- def diff(self, conn, f, fromonlyf):
+ def diff(self, conn, f, fromonlyf, oldid):
curs = conn.cursor()
# Fetch the old one so we have something to diff against
id, _from, _to, cc, subject, date, has_attachment, bodytxt = curs.fetchone()
except TypeError, e:
f.write("---- %s ----\n" % self.msgid)
- f.write("Could not re-find in archives: %s\n" % e)
+ f.write("Could not re-find in archives (old id was %s): %s\n" % (oldid, e))
f.write("\n-------------------------------\n\n")
return
if opt.update:
ap.store(conn, listid=-9, overwrite=True)
else:
- ap.diff(conn, f, fromonlyf)
+ ap.diff(conn, f, fromonlyf, id)
if datetime.now() - laststatus > timedelta(seconds=5):
sys.stdout.write("%s messages parsed (%s / second)\r" % (num, num / ((datetime.now()-firststatus).seconds)))
sys.stdout.flush()