summaryrefslogtreecommitdiff
path: root/src/leap/mail/incoming/service.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-06-04 20:08:46 -0400
committerKali Kaneko <kali@leap.se>2015-06-05 16:50:46 -0400
commit9f31b26909a62d5d76e06b51e1c7204778b1882d (patch)
treee4bd3941c041c8548197e66179e7ded1e6e674bb /src/leap/mail/incoming/service.py
parente46b14e6966045414a61103b3819a4277af7d211 (diff)
[refactor] deprecate old incoming index
Diffstat (limited to 'src/leap/mail/incoming/service.py')
-rw-r--r--src/leap/mail/incoming/service.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/leap/mail/incoming/service.py b/src/leap/mail/incoming/service.py
index 23aff3d..71edf08 100644
--- a/src/leap/mail/incoming/service.py
+++ b/src/leap/mail/incoming/service.py
@@ -161,21 +161,15 @@ class IncomingMail(Service):
Calls a deferred that will execute the fetch callback
in a separate thread
"""
- def mail_compat(failure):
- if failure.check(u1db_errors.InvalidGlobbing):
- # It looks like we are a dealing with an outdated
- # mx. Fallback to the version of the index
- warnings.warn("JUST_MAIL_COMPAT_IDX will be deprecated!",
- DeprecationWarning)
- return self._soledad.get_from_index(
- fields.JUST_MAIL_COMPAT_IDX, "*")
- return failure
+ def _sync_errback(failure):
+ failure.printTraceback()
def syncSoledadCallback(_):
+ # XXX this should be moved to adaptors
d = self._soledad.get_from_index(
- fields.JUST_MAIL_IDX, "*", "0")
- d.addErrback(mail_compat)
+ fields.JUST_MAIL_IDX, "1", "0")
d.addCallback(self._process_doclist)
+ d.addErrback(_sync_errback)
return d
logger.debug("fetching mail for: %s %s" % (