Don't return coroutine in DLNA/DMR service handler (#32011)

Fixes #32010
This commit is contained in:
Tsvi Mostovicz 2020-02-20 08:21:09 +02:00 committed by GitHub
parent 832337f26c
commit b6d60c36a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,10 +99,10 @@ def catch_request_errors():
"""Call wrapper for decorator."""
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
async def wrapper(self, *args, **kwargs):
"""Catch asyncio.TimeoutError, aiohttp.ClientError errors."""
try:
return func(self, *args, **kwargs)
return await func(self, *args, **kwargs)
except (asyncio.TimeoutError, aiohttp.ClientError):
_LOGGER.error("Error during call %s", func.__name__)