summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-05-08 16:43:57 -0300
committerTomas Touceda <chiiph@leap.se>2013-05-08 16:44:50 -0300
commit2d0762f05ff304b2d229915e5d20ae9e435e8003 (patch)
treeaf39bf6a9cd5e35b541f4ecfef63e58cafcb2100 /src/leap/soledad
parent2cd5a7e934a081709485e372bd9f1868a596e5d4 (diff)
Fix key for dict, and make couch_url a property
Diffstat (limited to 'src/leap/soledad')
-rw-r--r--src/leap/soledad/__init__.py2
-rw-r--r--src/leap/soledad/backends/couch.py19
2 files changed, 20 insertions, 1 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index b87dbbb6..1ef18174 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -245,7 +245,7 @@ class Soledad(object):
'database.')
self._set_symkey(
self._crypto.decrypt_sym(
- doc.content[self.KEY_SYMKEY],
+ doc.content[self.SYMKEY_KEY],
passphrase=self._passphrase))
# Stage 2 - Keys synchronization
self._assert_keys_in_shared_db()
diff --git a/src/leap/soledad/backends/couch.py b/src/leap/soledad/backends/couch.py
index a7b43e82..93279e2e 100644
--- a/src/leap/soledad/backends/couch.py
+++ b/src/leap/soledad/backends/couch.py
@@ -460,3 +460,22 @@ class CouchServerState(ServerState):
@type dbname: str
"""
CouchDatabase.delete_database(self._couch_url + '/' + dbname)
+
+ def _set_couch_url(self, url):
+ """
+ Set the couchdb URL
+
+ @param url: CouchDB URL
+ @type url: str
+ """
+ self._couch_url = url
+
+ def _get_couch_url(self):
+ """
+ Return CouchDB URL
+
+ @rtype: str
+ """
+ return self._couch_url
+
+ couch_url = property(_get_couch_url, _set_couch_url, doc='CouchDB URL')