diff options
author | Ruben Pollan <meskio@sindominio.net> | 2015-11-03 19:38:23 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2015-11-12 18:39:57 +0100 |
commit | 17545618c79478a104ca7be5dd601020f8749780 (patch) | |
tree | cd6e53697a59f2bff6179976a41c7bf2c153da80 /src/leap/mx/couchdbhelper.py | |
parent | 0d96ae2acb618114d7dc9b729275805d805eef17 (diff) |
[feat] update leap.mx usage of soledad CouchDatabase
- Related: #7565
Diffstat (limited to 'src/leap/mx/couchdbhelper.py')
-rw-r--r-- | src/leap/mx/couchdbhelper.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py index b26a0d8..115ecbe 100644 --- a/src/leap/mx/couchdbhelper.py +++ b/src/leap/mx/couchdbhelper.py @@ -52,10 +52,10 @@ class ConnectedCouchDB(client.CouchDB): :param str password: (optional) The password for authorization. :type password: str """ - self.mail_couch_url = "http://%s:%s@%s:%s" % (username, - password, - host, - port) + self._mail_couch_url = "http://%s:%s@%s:%s" % (username, + password, + host, + port) client.CouchDB.__init__(self, host, port=port, @@ -156,8 +156,9 @@ class ConnectedCouchDB(client.CouchDB): which fails with CouchDBError if there was any error. """ # TODO: that should be implemented with paisley + url = self._mail_couch_url + "/user-%s" % (uuid,) try: - db = CouchDatabase(self._mail_couch_url, "user-%s" % (uuid,)) + db = CouchDatabase.open_database(url, create=False) return defer.succeed(db.put_doc(doc)) except Exception as e: return defer.fail(CouchDBError(e.message)) |