fix deleting a file mid download
This commit is contained in:
parent
957d0290df
commit
df86937f4e
1 changed files with 7 additions and 3 deletions
|
@ -98,10 +98,14 @@ class StreamAssembler:
|
||||||
blob = await self.get_blob(blob_info.blob_hash, blob_info.length)
|
blob = await self.get_blob(blob_info.blob_hash, blob_info.length)
|
||||||
await self._decrypt_blob(blob, blob_info, self.descriptor.key)
|
await self._decrypt_blob(blob, blob_info, self.descriptor.key)
|
||||||
break
|
break
|
||||||
except (ValueError, IOError, OSError) as err:
|
except FileNotFoundError:
|
||||||
log.error("failed to decrypt blob %s for stream %s - %s", blob_info.blob_hash,
|
log.debug("stream assembler stopped")
|
||||||
self.descriptor.sd_hash, str(err))
|
return
|
||||||
|
except (ValueError, IOError, OSError):
|
||||||
|
log.warning("failed to decrypt blob %s for stream %s", blob_info.blob_hash,
|
||||||
|
self.descriptor.sd_hash)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not self.wrote_bytes_event.is_set():
|
if not self.wrote_bytes_event.is_set():
|
||||||
self.wrote_bytes_event.set()
|
self.wrote_bytes_event.set()
|
||||||
self.stream_finished_event.set()
|
self.stream_finished_event.set()
|
||||||
|
|
Loading…
Reference in a new issue