summaryrefslogtreecommitdiff
path: root/kvmd/validators/ugpio.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/validators/ugpio.py')
-rw-r--r--kvmd/validators/ugpio.py4
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)]