Use builtin TimeoutError [a-d] (#109678)
This commit is contained in:
parent
41a256a3ff
commit
c82933175d
63 changed files with 97 additions and 137 deletions
|
@ -1,7 +1,6 @@
|
|||
"""Helpers to deal with Cast devices."""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import configparser
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
|
@ -257,7 +256,7 @@ async def _fetch_playlist(hass, url, supported_content_types):
|
|||
playlist_data = (await resp.content.read(64 * 1024)).decode(charset)
|
||||
except ValueError as err:
|
||||
raise PlaylistError(f"Could not decode playlist {url}") from err
|
||||
except asyncio.TimeoutError as err:
|
||||
except TimeoutError as err:
|
||||
raise PlaylistError(f"Timeout while fetching playlist {url}") from err
|
||||
except aiohttp.client_exceptions.ClientError as err:
|
||||
raise PlaylistError(f"Error while fetching playlist {url}") from err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue