From 9ba6653475c69d0b7da1350fee5c3cfd7fcc87ed Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 18 Apr 2019 21:56:31 -0300 Subject: [PATCH] raise proper error when sd is not available --- lbrynet/stream/descriptor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/stream/descriptor.py b/lbrynet/stream/descriptor.py index f75486213..a2f4d1da2 100644 --- a/lbrynet/stream/descriptor.py +++ b/lbrynet/stream/descriptor.py @@ -162,6 +162,8 @@ class StreamDescriptor: @classmethod async def from_stream_descriptor_blob(cls, loop: asyncio.BaseEventLoop, blob_dir: str, blob: AbstractBlob) -> 'StreamDescriptor': + if not blob.is_readable(): + raise InvalidStreamDescriptorError(f"unreadable/missing blob: {blob.blob_hash}") return await loop.run_in_executor(None, cls._from_stream_descriptor_blob, loop, blob_dir, blob) @staticmethod