summaryrefslogtreecommitdiff
path: root/kvmd
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
parent2211124ecba827c916882f3a291d8b227ea5fdcf (diff)
tests
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/apps/__init__.py2
-rw-r--r--kvmd/validators/kvm.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index 9c8f5c03..c03fc48b 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -84,8 +84,8 @@ from ..validators.kvm import valid_stream_resolution
from ..validators.kvm import valid_hid_key
from ..validators.kvm import valid_hid_mouse_move
from ..validators.kvm import valid_ugpio_driver
-from ..validators.kvm import valid_ugpio_mode
from ..validators.kvm import valid_ugpio_channel
+from ..validators.kvm import valid_ugpio_mode
from ..validators.kvm import valid_ugpio_view_table
from ..validators.hw import valid_gpio_pin
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)]