mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-11-28 04:08:26 +00:00
Pass container to attribute_getter
This commit is contained in:
@@ -195,7 +195,7 @@ class Feature:
|
|||||||
if isinstance(getter, str):
|
if isinstance(getter, str):
|
||||||
return getattr(self._container, getter)
|
return getattr(self._container, getter)
|
||||||
if callable(getter):
|
if callable(getter):
|
||||||
return getter()
|
return getter(self._container)
|
||||||
raise ValueError("Invalid getter: %s", getter) # pragma: no cover
|
raise ValueError("Invalid getter: %s", getter) # pragma: no cover
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Reference in New Issue
Block a user