summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/core/mail_services.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index ef333cce..bc85889d 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -545,14 +545,18 @@ class StandardMailService(service.MultiService, HookableService):
check_and_fix_urw_only(cert_path)
def hook_on_bonafide_logout(self, **kw):
- username = kw['username']
- multiservice = self.getServiceNamed('incoming_mail')
- incoming = multiservice.getServiceNamed(username)
- logger.debug(
- 'looking for incoming mail service '
- 'for logout: %s' % username)
- if incoming:
- incoming.stopService()
+ username = kw.get('username', None)
+ if username:
+ multiservice = self.getServiceNamed('incoming_mail')
+ try:
+ incoming = multiservice.getServiceNamed(username)
+ except KeyError:
+ incoming = None
+ if incoming:
+ logger.debug(
+ 'looking for incoming mail service '
+ 'for logout: %s' % username)
+ incoming.stopService()
# commands
@@ -709,6 +713,7 @@ class IncomingMailService(service.MultiService):
# config utilities. should be moved to bonafide
#
+
SERVICES = ('soledad', 'smtp', 'eip')