summaryrefslogtreecommitdiff
path: root/src/leap/soledad/backends/leap_backend.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-24 11:58:56 -0200
committerdrebs <drebs@leap.se>2013-01-24 11:58:56 -0200
commit1dec55b5c5054a4c42534c0f7e9b8bad5b82c27c (patch)
tree79cc82f9c1d12f92ac82a8e2bcd3eb1682d6db90 /src/leap/soledad/backends/leap_backend.py
parent6bd210fac7d5da5efeaa646a51f6c50b00e600a2 (diff)
Source files stick to pep8.
Diffstat (limited to 'src/leap/soledad/backends/leap_backend.py')
-rw-r--r--src/leap/soledad/backends/leap_backend.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/leap/soledad/backends/leap_backend.py b/src/leap/soledad/backends/leap_backend.py
index 5a7dfa2f..7e98dd45 100644
--- a/src/leap/soledad/backends/leap_backend.py
+++ b/src/leap/soledad/backends/leap_backend.py
@@ -12,12 +12,11 @@ from leap.soledad.util import GPGWrapper
import uuid
-import uuid
-
class NoDefaultKey(Exception):
pass
+
class NoSoledadInstance(Exception):
pass
@@ -42,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):
"""
@@ -90,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