diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-01-12 18:44:34 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-01-12 18:44:34 -0300 |
commit | 001dfc4d5c994f60504ab626927a9711449ab9c6 (patch) | |
tree | 57a021f22815943bfdeea09e2b47208a4789935e /src/leap/bitmask/services/mail/conductor.py | |
parent | 8dc5ed97f10e01f92aea23439aa749c480a29a56 (diff) | |
parent | 6cc752e403e08795273270f637ed212270d2eaef (diff) |
Merge remote-tracking branch 'refs/remotes/kali/feature/offline-mode' into develop
Diffstat (limited to 'src/leap/bitmask/services/mail/conductor.py')
-rw-r--r-- | src/leap/bitmask/services/mail/conductor.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/leap/bitmask/services/mail/conductor.py b/src/leap/bitmask/services/mail/conductor.py index 875b98ea..fc53923c 100644 --- a/src/leap/bitmask/services/mail/conductor.py +++ b/src/leap/bitmask/services/mail/conductor.py @@ -72,6 +72,8 @@ class IMAPControl(object): """ Starts imap service. """ + from leap.bitmask.config import flags + logger.debug('Starting imap service') leap_assert(sameProxiedObjects(self._soledad, None) is not True, @@ -81,12 +83,17 @@ class IMAPControl(object): "We need a non-null keymanager for initializing imap " "service") + offline = flags.OFFLINE self.imap_service, self.imap_port, \ self.imap_factory = imap.start_imap_service( self._soledad, self._keymanager, - userid=self.userid) - self.imap_service.start_loop() + userid=self.userid, + offline=offline) + + if offline is False: + logger.debug("Starting loop") + self.imap_service.start_loop() def stop_imap_service(self): """ @@ -340,7 +347,7 @@ class MailConductor(IMAPControl, SMTPControl): self._mail_machine = None self._mail_connection = mail_connection.MailConnection() - self.userid = None + self._userid = None @property def userid(self): |