summaryrefslogtreecommitdiff
path: root/kvmd/validators
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-09 05:23:37 +0300
committerDevaev Maxim <[email protected]>2020-09-09 05:23:37 +0300
commita9a6f477bc213b8e7ee87db8c912e618f6157d9d (patch)
treeccc0c23c2c7352095a9bfe53f4ef110232d62e3d /kvmd/validators
parent2211124ecba827c916882f3a291d8b227ea5fdcf (diff)
tests
Diffstat (limited to 'kvmd/validators')
-rw-r--r--kvmd/validators/kvm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/validators/kvm.py b/kvmd/validators/kvm.py
index 0374ebd8..b06edf95 100644
--- a/kvmd/validators/kvm.py
+++ b/kvmd/validators/kvm.py
@@ -111,15 +111,15 @@ def valid_ugpio_driver(arg: Any, variants: Optional[Set[str]]=None) -> str:
return arg
-def valid_ugpio_mode(arg: Any) -> str:
- return check_string_in_list(arg, "GPIO mode", ["input", "output"])
-
-
def valid_ugpio_channel(arg: Any) -> str:
name = "GPIO channel"
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_view_table(arg: Any) -> List[List[str]]:
try:
return [list(map(str, row)) for row in list(arg)]