summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/service
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-11-06 11:09:19 -0200
committerKali Kaneko <kali@leap.se>2013-11-06 11:09:19 -0200
commit8369307bf67821e847ccfe607470380f43e72feb (patch)
tree6d5e091e52f8ff612bf27b016e2368ae128202b1 /src/leap/mail/imap/service
parent00fcda57c933d68df8a52d9769246a81e83d0792 (diff)
Make the pkey a property
so we can allow multiple accounts in the imap fetcher.
Diffstat (limited to 'src/leap/mail/imap/service')
-rw-r--r--src/leap/mail/imap/service/imap.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py
index 5f7322a..984ad04 100644
--- a/src/leap/mail/imap/service/imap.py
+++ b/src/leap/mail/imap/service/imap.py
@@ -29,7 +29,7 @@ from twisted.python import log
logger = logging.getLogger(__name__)
from leap.common import events as leap_events
-from leap.common.check import leap_assert, leap_assert_type
+from leap.common.check import leap_assert, leap_assert_type, leap_check
from leap.keymanager import KeyManager
from leap.mail.imap.server import SoledadBackedAccount
from leap.mail.imap.fetch import LeapIncomingMail
@@ -152,6 +152,8 @@ def run_service(*args, **kwargs):
port = kwargs.get('port', IMAP_PORT)
check_period = kwargs.get('check_period', INCOMING_CHECK_PERIOD)
+ userid = kwargs.get('userid', None)
+ leap_check(userid is not None, "need an user id")
uuid = soledad._get_uuid()
factory = LeapIMAPFactory(uuid, soledad)
@@ -165,7 +167,8 @@ def run_service(*args, **kwargs):
keymanager,
soledad,
factory.theAccount,
- check_period)
+ check_period,
+ userid)
except CannotListenError:
logger.error("IMAP Service failed to start: "
"cannot listen in port %s" % (port,))