diff options
author | drebs <drebs@leap.se> | 2013-04-16 18:22:06 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-04-16 18:22:06 -0300 |
commit | 5058072dd6a37b69aaaffe57c0fbfa5549426d6d (patch) | |
tree | 0314a89e8ec4eb85b5dc4c9d443341334eb81282 /src/leap/soledad/backends | |
parent | ef6ddc1f03b726b2a6b2a773e752c530d1371a80 (diff) |
Remove GPG asymmetric key stuff.
Everything related to asymmetric encryting will be handled by Key Manager.
Diffstat (limited to 'src/leap/soledad/backends')
-rw-r--r-- | src/leap/soledad/backends/couch.py | 5 | ||||
-rw-r--r-- | src/leap/soledad/backends/leap_backend.py | 2 |
2 files changed, 3 insertions, 4 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) diff --git a/src/leap/soledad/backends/leap_backend.py b/src/leap/soledad/backends/leap_backend.py index 52a8463d..4ea131c0 100644 --- a/src/leap/soledad/backends/leap_backend.py +++ b/src/leap/soledad/backends/leap_backend.py @@ -100,7 +100,7 @@ class LeapDocument(Document): """ Return an encrypted JSON serialization of document's contents. - @return: The encrpted JSON serialization of document's contents. + @return: The encrypted JSON serialization of document's contents. @rtype: str """ if not self._soledad: |