fixes from jack comments

This commit is contained in:
Victor Shyba 2019-02-05 13:00:57 -03:00
parent c31e61586d
commit 63d1ec3c28

View file

@ -89,12 +89,12 @@ class StreamAssembler:
with open(self.output_path, 'wb') as stream_handle:
self.stream_handle = stream_handle
for blob_info in self.descriptor.blobs[:-1]:
while True:
while not stream_handle.closed:
try:
blob = await self.get_blob(blob_info.blob_hash, blob_info.length)
if await self._decrypt_blob(blob, blob_info, self.descriptor.key):
await self.blob_manager.blob_completed(blob)
break
break
except FileNotFoundError:
log.debug("stream assembler stopped")
return