summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-03-15 22:29:03 +0200
committerMaxim Devaev <[email protected]>2024-03-15 22:29:03 +0200
commit88fae53541ac5431bd3428681ec7661d81e8ff12 (patch)
tree327097d760cd5a05b923d4d4606ce13595277f11 /kvmd
parentb9c47126abf87c4659b9b3ed17fb713029edace4 (diff)
refactoring
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/plugins/ugpio/extron.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/kvmd/plugins/ugpio/extron.py b/kvmd/plugins/ugpio/extron.py
index a55b77f7..c088e1e6 100644
--- a/kvmd/plugins/ugpio/extron.py
+++ b/kvmd/plugins/ugpio/extron.py
@@ -19,6 +19,7 @@
# #
# ========================================================================== #
+
import re
import multiprocessing
import functools
@@ -77,10 +78,10 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
@classmethod
def get_plugin_options(cls) -> dict:
return {
- "device": Option("", type=valid_abs_path, unpack_as="device_path"),
+ "device": Option("", type=valid_abs_path, unpack_as="device_path"),
"speed": Option(9600, type=valid_tty_speed),
- "read_timeout": Option(2.0, type=valid_float_f01),
- "protocol": Option(1, type=functools.partial(valid_number, min=1, max=2)),
+ "read_timeout": Option(2.0, type=valid_float_f01),
+ "protocol": Option(1, type=functools.partial(valid_number, min=1, max=2)),
}
@classmethod
@@ -177,10 +178,8 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
def __send_channel(self, tty: serial.Serial, channel: int) -> None:
assert 0 <= channel <= 3
- cmd = b"%d!\n" % (
- channel + 1,
- )
- tty.write(cmd) # Twice because of ezcoo bugs
+ cmd = b"%d!\n" % (channel + 1)
+ tty.write(cmd)
tty.flush()
def __str__(self) -> str: