mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Include functools.wraps
This commit is contained in:
parent
2d337fd29a
commit
529eee994b
@ -5,6 +5,7 @@ For more details about this platform, please refer to the documentation at
|
|||||||
https://home-assistant.io/components/media_player.kodi/
|
https://home-assistant.io/components/media_player.kodi/
|
||||||
"""
|
"""
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from functools import wraps
|
||||||
import logging
|
import logging
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
@ -88,6 +89,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
|
|
||||||
def cmd(func):
|
def cmd(func):
|
||||||
"""Decorator to catch command exceptions."""
|
"""Decorator to catch command exceptions."""
|
||||||
|
@wraps(func)
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def wrapper(obj, *args, **kwargs):
|
def wrapper(obj, *args, **kwargs):
|
||||||
"""Wrapper for all command methods."""
|
"""Wrapper for all command methods."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user