summaryrefslogtreecommitdiff
path: root/kvmd/plugins/ugpio/ezcoo.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-09-08 06:08:11 +0300
committerMaxim Devaev <[email protected]>2021-09-08 06:08:11 +0300
commitca812117e48cbc6e2c71947b912748cfd3ff9691 (patch)
treed8daa43c9e606ed0c4226a112e943aa683fd627f /kvmd/plugins/ugpio/ezcoo.py
parent5d1228eb9e5b159d0909453ed85280b9fb794a9e (diff)
improved pins validation
Diffstat (limited to 'kvmd/plugins/ugpio/ezcoo.py')
-rw-r--r--kvmd/plugins/ugpio/ezcoo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/ugpio/ezcoo.py b/kvmd/plugins/ugpio/ezcoo.py
index a20aed32..e79ed057 100644
--- a/kvmd/plugins/ugpio/ezcoo.py
+++ b/kvmd/plugins/ugpio/ezcoo.py
@@ -88,8 +88,8 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
}
@classmethod
- def get_pin_validator(cls) -> Callable[[Any], str]:
- return (lambda arg: str(valid_number(arg, min=0, max=3, name="Ezcoo channel")))
+ def get_pin_validator(cls) -> Callable[[Any], Any]:
+ return functools.partial(valid_number, min=0, max=3, name="Ezcoo channel")
def prepare(self) -> None:
assert self.__proc is None