forked from home-assistant/core
Don't return coroutine in DLNA/DMR service handler (#32011)
Fixes #32010
This commit is contained in:
committed by
Paulus Schoutsen
parent
35e9b52e2e
commit
2fb6bb2a92
@@ -99,10 +99,10 @@ def catch_request_errors():
|
|||||||
"""Call wrapper for decorator."""
|
"""Call wrapper for decorator."""
|
||||||
|
|
||||||
@functools.wraps(func)
|
@functools.wraps(func)
|
||||||
def wrapper(self, *args, **kwargs):
|
async def wrapper(self, *args, **kwargs):
|
||||||
"""Catch asyncio.TimeoutError, aiohttp.ClientError errors."""
|
"""Catch asyncio.TimeoutError, aiohttp.ClientError errors."""
|
||||||
try:
|
try:
|
||||||
return func(self, *args, **kwargs)
|
return await func(self, *args, **kwargs)
|
||||||
except (asyncio.TimeoutError, aiohttp.ClientError):
|
except (asyncio.TimeoutError, aiohttp.ClientError):
|
||||||
_LOGGER.error("Error during call %s", func.__name__)
|
_LOGGER.error("Error during call %s", func.__name__)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user