summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/services/mail
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-12-27 09:52:18 -0400
committerKali Kaneko <kali@leap.se>2013-12-27 09:52:18 -0400
commitd508f41a6f0ae1f16ee2c0f28b6fb2484d487d4f (patch)
tree7d50b315d937846b22a875685335dec504067f24 /src/leap/bitmask/services/mail
parent477df116b6e7c2223fe70e73f979f43abb21288b (diff)
update mail path after refactor
Diffstat (limited to 'src/leap/bitmask/services/mail')
-rw-r--r--src/leap/bitmask/services/mail/repair.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/leap/bitmask/services/mail/repair.py b/src/leap/bitmask/services/mail/repair.py
index 767df1ef..30571adf 100644
--- a/src/leap/bitmask/services/mail/repair.py
+++ b/src/leap/bitmask/services/mail/repair.py
@@ -28,7 +28,7 @@ from leap.bitmask.crypto.srpauth import SRPAuth
from leap.bitmask.util import get_path_prefix
from leap.bitmask.services.soledad.soledadbootstrapper import get_db_paths
-from leap.mail.imap.server import SoledadBackedAccount
+from leap.mail.imap.account import SoledadBackedAccount
from leap.soledad.client import Soledad
logger = logging.getLogger(__name__)
@@ -145,11 +145,11 @@ class MBOXPlumber(object):
self.acct = SoledadBackedAccount(self.userid, self.sol)
for mbox_name in self.acct.mailboxes:
- self.repair_mbox(mbox_name)
+ self.repair_mbox_uids(mbox_name)
print "done."
self.exit()
- def repair_mbox(self, mbox_name):
+ def repair_mbox_uids(self, mbox_name):
"""
Repairs indexes for a given mbox
@@ -176,7 +176,8 @@ class MBOXPlumber(object):
old_uid = doc.content['uid']
doc.content['uid'] = mindex
self.sol.put_doc(doc)
- print "%s -> %s (%s)" % (mindex, doc.content['uid'], old_uid)
+ if mindex != old_uid:
+ print "%s -> %s (%s)" % (mindex, doc.content['uid'], old_uid)
old_last_uid = mbox.last_uid
mbox.last_uid = len_mbox