diff options
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): |