summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2016-09-19 22:06:43 -0300
committerdrebs <drebs@riseup.net>2016-09-22 15:34:06 -0300
commitc31be3e1bf6e2ea1b081f011664df4313eb7dadf (patch)
tree6fe1ef7c617c586be3b3efb9b951fd6bfe876385 /src
parent1511d05e8ea302ab54bac6123b4223b43e85cbfe (diff)
[bug] register keymanager instance as soon as it is created (#8460)
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/core/mail_services.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index c0c986a..8935bdd 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -216,10 +216,10 @@ class KeymanagerContainer(Container):
super(KeymanagerContainer, self).__init__(service=service)
def add_instance(self, userid, token, uuid, soledad):
-
+ log.msg("Adding Keymanager instance for: %s" % userid)
keymanager = self._create_keymanager_instance(
userid, token, uuid, soledad)
-
+ super(KeymanagerContainer, self).add_instance(userid, keymanager)
d = self._get_or_generate_keys(keymanager, userid)
d.addCallback(self._on_keymanager_ready_cb, userid, soledad)
return d
@@ -228,10 +228,6 @@ class KeymanagerContainer(Container):
self.get_instance(userid)._token = token
def _on_keymanager_ready_cb(self, keymanager, userid, soledad):
- # TODO use onready-deferreds instead
- super(KeymanagerContainer, self).add_instance(userid, keymanager)
-
- log.msg("Adding Keymanager instance for: %s" % userid)
data = {'userid': userid, 'soledad': soledad, 'keymanager': keymanager}
self.service.trigger_hook('on_new_keymanager_instance', **data)