diff options
author | Kali Kaneko <kali@leap.se> | 2016-05-01 11:09:07 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-05-02 19:36:26 -0400 |
commit | 1173e77cb8d635936c9730ba4ad8b88b24ad1be2 (patch) | |
tree | 025d58a7fabdc432d05487886b619efd5fc14f87 /src/leap/bitmask/core/mail_services.py | |
parent | 08da5b11103cdd132c3ac4110ba42fcc8510a78b (diff) |
[feature] pluggable backends and api registry
the idea behind this mechanism (partially implemented for that) is to be
able to check the backend output against some type annotations.
We want to be able to detect if a given backend (real services or
authoritative mocks) have diverged from what's specified in the API
annotations.
Diffstat (limited to 'src/leap/bitmask/core/mail_services.py')
-rw-r--r-- | src/leap/bitmask/core/mail_services.py | 10 |
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 3495aa39..fb9ee698 100644 --- a/src/leap/bitmask/core/mail_services.py +++ b/src/leap/bitmask/core/mail_services.py @@ -64,10 +64,10 @@ class ImproperlyConfigured(Exception): class SoledadContainer(Container): - def __init__(self, basedir=DEFAULT_BASEDIR): + def __init__(self, service=None, basedir=DEFAULT_BASEDIR): self._basedir = os.path.expanduser(basedir) self._usermap = UserMap() - super(SoledadContainer, self).__init__() + super(SoledadContainer, self).__init__(service=service) def add_instance(self, userid, passphrase, uuid=None, token=None): @@ -89,7 +89,7 @@ class SoledadContainer(Container): uuid, passphrase, soledad_path, soledad_url, cert_path, token) - self.add_instances(userid, soledad) + super(SoledadContainer, self).add_instance(userid, soledad) data = {'user': userid, 'uuid': uuid, 'token': token, 'soledad': soledad} @@ -202,9 +202,9 @@ class SoledadService(HookableService): class KeymanagerContainer(Container): - def __init__(self, basedir): + def __init__(self, service=None, basedir=DEFAULT_BASEDIR): self._basedir = os.path.expanduser(basedir) - super(KeymanagerContainer, self).__init__() + super(KeymanagerContainer, self).__init__(service=service) def add_instance(self, userid, token, uuid, soledad): |