re-raise unexpected resolve error during download as a ResolveError

This commit is contained in:
Jack Robison 2019-07-29 17:47:40 -04:00
parent f4c111f04c
commit 221585908a
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -360,6 +360,10 @@ class StreamManager:
) )
except asyncio.TimeoutError: except asyncio.TimeoutError:
raise ResolveTimeout(uri) raise ResolveTimeout(uri)
except Exception as err:
if isinstance(err, asyncio.CancelledError):
raise
raise ResolveError(f"Unexpected error resolving stream: {str(err)}")
await self.storage.save_claims_for_resolve([ await self.storage.save_claims_for_resolve([
value for value in resolved_result.values() if 'error' not in value value for value in resolved_result.values() if 'error' not in value
]) ])