summaryrefslogtreecommitdiff
path: root/src/leap/soledad/backends/leap_backend.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-24 12:03:45 -0200
committerdrebs <drebs@leap.se>2013-01-24 12:03:45 -0200
commite1494639f57cafddfd433c62adaa52a21f104e10 (patch)
treeb9e6b700db7ab9d9b3f927222eb0f780e7c851d8 /src/leap/soledad/backends/leap_backend.py
parent19da34c598ce6db172c1e1a8978bf031fc6db89b (diff)
parent1dec55b5c5054a4c42534c0f7e9b8bad5b82c27c (diff)
Merge branch 'feature/soledad-api' into develop
Conflicts: src/leap/soledad/util.py
Diffstat (limited to 'src/leap/soledad/backends/leap_backend.py')
-rw-r--r--src/leap/soledad/backends/leap_backend.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/soledad/backends/leap_backend.py b/src/leap/soledad/backends/leap_backend.py
index 3e859f7c..7e98dd45 100644
--- a/src/leap/soledad/backends/leap_backend.py
+++ b/src/leap/soledad/backends/leap_backend.py
@@ -41,8 +41,9 @@ class LeapDocument(Document):
"""
if not self._soledad:
raise NoSoledadInstance()
- ciphertext = self._soledad.encrypt_symmetric(self.doc_id, self.get_json())
- return json.dumps({'_encrypted_json' : ciphertext})
+ ciphertext = self._soledad.encrypt_symmetric(self.doc_id,
+ self.get_json())
+ return json.dumps({'_encrypted_json': ciphertext})
def set_encrypted_json(self, encrypted_json):
"""
@@ -89,7 +90,8 @@ class LeapDatabase(HTTPDatabase):
doc_id = self._allocate_doc_id()
res, headers = self._request_json('PUT', ['doc', doc_id], {},
content, 'application/json')
- new_doc = self._factory(doc_id, res['rev'], content, soledad=self._soledad)
+ new_doc = self._factory(doc_id, res['rev'], content,
+ soledad=self._soledad)
return new_doc