summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r--src/leap/bitmask/core/mail_services.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index 183477af..b6c54047 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -18,7 +18,7 @@
Mail services.
This is quite moving work still.
-This should be moved to the different packages when it stabilizes.
+This should be moved to the different submodules when it stabilizes.
"""
import json
import os
@@ -398,19 +398,19 @@ class KeymanagerService(HookableService):
# commands
def do_list_keys(self, userid, private=False):
- km = self._container.get_instance(userid)
+ km = self._container.get_instance(userid['user'])
d = km.get_all_keys(private=private)
d.addCallback(lambda keys: [dict(key) for key in keys])
return d
def do_export(self, userid, address, private=False):
- km = self._container.get_instance(userid)
+ km = self._container.get_instance(userid['user'])
d = km.get_key(address, private=private, fetch_remote=False)
d.addCallback(lambda key: dict(key))
return d
def do_insert(self, userid, address, rawkey, validation='Fingerprint'):
- km = self._container.get_instance(userid)
+ km = self._container.get_instance(userid['user'])
validation = ValidationLevels.get(validation)
d = km.put_raw_key(rawkey, address, validation=validation)
d.addCallback(lambda _: km.get_key(address, fetch_remote=False))
@@ -419,7 +419,7 @@ class KeymanagerService(HookableService):
@defer.inlineCallbacks
def do_delete(self, userid, address, private=False):
- km = self._container.get_instance(userid)
+ km = self._container.get_instance(userid['user'])
key = yield km.get_key(address, private=private, fetch_remote=False)
km.delete_key(key)
defer.returnValue(key.fingerprint)