diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-12-31 21:14:49 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-12-31 21:14:49 -0300 |
commit | 50a863e58c3075bf6206d060d41b35790fe5e955 (patch) | |
tree | a1fab7b6f5cfd538ef1a4285baf4ee826802444a /src | |
parent | 8a89f00a4a2b9e5622ce8581ebf633ae222311df (diff) |
[bug] handle incomplete preamble as a retriable error
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/soledad/client/_db/blobs/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/soledad/client/_db/blobs/__init__.py b/src/leap/soledad/client/_db/blobs/__init__.py index d4eddb8f..cacfe638 100644 --- a/src/leap/soledad/client/_db/blobs/__init__.py +++ b/src/leap/soledad/client/_db/blobs/__init__.py @@ -104,8 +104,12 @@ class DecrypterBuffer(object): if self.decrypter: real_size = self.decrypter.decrypted_content_size return self.decrypter.endStream(), real_size - else: + elif hasattr(self, 'raw_data'): + # Externally encrypted blob, see Incoming API specification return self.raw_data, self.raw_data.tell() + else: + msg = "Incomplete Blob: %s" % self.doc_info.doc_id + raise RetriableTransferError(msg) class StreamDecrypterBuffer(object): |