summaryrefslogtreecommitdiff
path: root/kvmd/validators
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-10 09:31:05 +0300
committerDevaev Maxim <[email protected]>2020-09-10 09:31:05 +0300
commit9cb5582565aa2301a238ca382a32dc80106f6c15 (patch)
treeb0e06d9cb15c88f72a8a42e0c02a97a7b0965663 /kvmd/validators
parent967afb2d9a0f4a94026ec612801b6291db5c6a72 (diff)
only available gpio modes
Diffstat (limited to 'kvmd/validators')
-rw-r--r--kvmd/validators/kvm.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/validators/kvm.py b/kvmd/validators/kvm.py
index 5a1fe1ae..676d5539 100644
--- a/kvmd/validators/kvm.py
+++ b/kvmd/validators/kvm.py
@@ -116,8 +116,8 @@ def valid_ugpio_channel(arg: Any) -> str:
return check_len(check_re_match(arg, name, r"^[a-zA-Z_][a-zA-Z0-9_-]*$"), name, 255)
-def valid_ugpio_mode(arg: Any) -> str:
- return check_string_in_list(arg, "GPIO mode", ["input", "output"])
+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_table(arg: Any) -> List[List[str]]: