From ed1de5e0f0ee84156ab35e295bc7d778aded81c4 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 1 May 2013 10:10:08 -0300 Subject: Add messages to leap_asserts. --- src/leap/soledad/backends/leap_backend.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/leap') 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] -- cgit v1.2.3