summaryrefslogtreecommitdiff
path: root/src/leap/soledad/backends/leap_backend.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-01 10:10:08 -0300
committerdrebs <drebs@leap.se>2013-05-01 10:10:08 -0300
commited1de5e0f0ee84156ab35e295bc7d778aded81c4 (patch)
tree8f24ebf3f1f039018a98e706334ae870848ae8c5 /src/leap/soledad/backends/leap_backend.py
parent67a998e19d43e8b7cc143373d1a95b97400776b4 (diff)
Add messages to leap_asserts.
Diffstat (limited to 'src/leap/soledad/backends/leap_backend.py')
-rw-r--r--src/leap/soledad/backends/leap_backend.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/soledad/backends/leap_backend.py b/src/leap/soledad/backends/leap_backend.py
index f49c87be..26b07f9e 100644
--- a/src/leap/soledad/backends/leap_backend.py
+++ b/src/leap/soledad/backends/leap_backend.py
@@ -143,10 +143,10 @@ def decrypt_doc_json(crypto, doc_id, doc_json):
@return: The JSON serialization of the decrypted content.
@rtype: str
"""
- leap_assert(isinstance(doc_id, str))
- leap_assert(doc_id != '')
- leap_assert(isinstance(doc_json, str))
- leap_assert(doc_json != '')
+ leap_assert(isinstance(doc_id, str), 'Document id is not a string.')
+ leap_assert(doc_id != '', 'Received empty document id.')
+ leap_assert(isinstance(doc_json, str), 'Document JSON is not a string.')
+ leap_assert(doc_json != '', 'Received empty document JSON.')
content = json.loads(doc_json)
ciphertext = content[ENC_JSON_KEY]
enc_scheme = content[ENC_SCHEME_KEY]