summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)