summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/service/imap.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-05-28 19:03:24 -0400
committerKali Kaneko <kali@leap.se>2015-06-05 16:50:46 -0400
commit4c12d05d063d42171808c432bee90de67c4042b6 (patch)
tree7839f7e8cf9f9ac941008f71443c73d168f718ac /src/leap/mail/imap/service/imap.py
parent8915db2e1c1a339cf36ae0e28da627bb1a8e040e (diff)
[refactor] move hooks to account
Diffstat (limited to 'src/leap/mail/imap/service/imap.py')
-rw-r--r--src/leap/mail/imap/service/imap.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py
index e401283..92d05cc 100644
--- a/src/leap/mail/imap/service/imap.py
+++ b/src/leap/mail/imap/service/imap.py
@@ -32,11 +32,9 @@ from twisted.python import log
logger = logging.getLogger(__name__)
from leap.common.events import emit, catalog
-from leap.common.check import leap_assert_type, leap_check
+from leap.common.check import leap_check
from leap.mail.imap.account import IMAPAccount
from leap.mail.imap.server import LEAPIMAPServer
-from leap.mail.plugins import soledad_sync_hooks
-from leap.soledad.client import Soledad
DO_MANHOLE = os.environ.get("LEAP_MAIL_MANHOLE", None)
@@ -92,17 +90,9 @@ class LeapIMAPFactory(ServerFactory):
theAccount = IMAPAccount(uuid, soledad)
self.theAccount = theAccount
- self._initialize_sync_hooks()
-
self._connections = defaultdict()
# XXX how to pass the store along?
- def _initialize_sync_hooks(self):
- soledad_sync_hooks.post_sync_uid_reindexer.set_account(self.theAccount)
-
- def _teardown_sync_hooks(self):
- soledad_sync_hooks.post_sync_uid_reindexer.set_account(None)
-
def buildProtocol(self, addr):
"""
Return a protocol suitable for the job.
@@ -136,7 +126,6 @@ class LeapIMAPFactory(ServerFactory):
# mark account as unusable, so any imap command will fail
# with unauth state.
self.theAccount.end_session()
- self._teardown_sync_hooks()
# TODO should wait for all the pending deferreds,
# the twisted way!