summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-12-20 18:46:22 +0200
committerKali Kaneko <kali@leap.se>2017-12-22 20:03:28 +0100
commitf4a3c23be148a822352d484c263ead0e4fd2b907 (patch)
tree93f15dff68bab0c277b7d5b16bf93c65f7ff5b7f /src
parentfabead6e5956b1a78a1e7b8346eb355e9e7330c1 (diff)
[bug] fetch the incoming service only if is on
If you try to fetch the incoming service while it's still starting it throws a KeyError. - Resolves: #9174
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/core/mail_services.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index 24bc48fa..6dfc2410 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -824,8 +824,8 @@ class IncomingMailService(service.MultiService):
defer.returnValue({'status': 'off', 'error': None, 'unread': None})
status = self._status[userid]
- incoming = self.getServiceNamed(userid)
if status['status'] == 'on':
+ incoming = self.getServiceNamed(userid)
status['unread'] = yield incoming.unread()
defer.returnValue(status)