summaryrefslogtreecommitdiff
path: root/src/leap/soledad/backends/couch.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-16 18:22:06 -0300
committerdrebs <drebs@leap.se>2013-04-16 18:22:06 -0300
commit5058072dd6a37b69aaaffe57c0fbfa5549426d6d (patch)
tree0314a89e8ec4eb85b5dc4c9d443341334eb81282 /src/leap/soledad/backends/couch.py
parentef6ddc1f03b726b2a6b2a773e752c530d1371a80 (diff)
Remove GPG asymmetric key stuff.
Everything related to asymmetric encryting will be handled by Key Manager.
Diffstat (limited to 'src/leap/soledad/backends/couch.py')
-rw-r--r--src/leap/soledad/backends/couch.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/leap/soledad/backends/couch.py b/src/leap/soledad/backends/couch.py
index 1843bad1..6440232d 100644
--- a/src/leap/soledad/backends/couch.py
+++ b/src/leap/soledad/backends/couch.py
@@ -145,7 +145,7 @@ class CouchDatabase(ObjectStoreDatabase):
has_conflicts=has_conflicts)
contents = self._database.get_attachment(cdoc, 'u1db_json')
if contents:
- doc.content = json.loads(contents.getvalue())
+ doc.content = json.loads(contents.read())
else:
doc.make_tombstone()
return doc
@@ -313,7 +313,7 @@ class CouchDatabase(ObjectStoreDatabase):
"""
# retrieve u1db data from couch db
cdoc = self._database.get(self.U1DB_DATA_DOC_ID)
- jsonstr = self._database.get_attachment(cdoc, 'u1db_json').getvalue()
+ jsonstr = self._database.get_attachment(cdoc, 'u1db_json').read()
content = json.loads(jsonstr)
# set u1db database info
#self._sync_log = content['sync_log']
@@ -410,7 +410,6 @@ class CouchServerState(ServerState):
@rtype: CouchDatabase
"""
# TODO: open couch
- from leap.soledad.backends.couch import CouchDatabase
return CouchDatabase.open_database(self.couch_url + '/' + dbname,
create=False)