diff options
author | Maxim Devaev <[email protected]> | 2022-10-08 06:09:33 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-10-08 06:09:33 +0300 |
commit | a39d3dffbe837c15576615656df5a924bcd44831 (patch) | |
tree | 407258ff32ac271ec2ccf6069a00e56ce1f04722 /kvmd/validators | |
parent | 16d9c3815f5bb5ba98f0923efc9f0fad8e2f48a2 (diff) |
pikvm/pikvm#803: Ability to use LEDs in GPIO title
Diffstat (limited to 'kvmd/validators')
-rw-r--r-- | kvmd/validators/ugpio.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/validators/ugpio.py b/kvmd/validators/ugpio.py index c05aa75d..ba4a5c5b 100644 --- a/kvmd/validators/ugpio.py +++ b/kvmd/validators/ugpio.py @@ -46,6 +46,10 @@ def valid_ugpio_mode(arg: Any, variants: set[str]) -> str: return check_string_in_list(arg, "GPIO driver's pin mode", variants) +def valid_ugpio_view_title(arg: Any) -> (str | list[str]): + return (list(map(str, arg)) if isinstance(arg, list) else str(arg)) + + def valid_ugpio_view_table(arg: Any) -> list[list[str]]: # pylint: disable=inconsistent-return-statements try: return [list(map(str, row)) for row in list(arg)] |