diff options
author | Maxim Devaev <[email protected]> | 2024-09-18 04:37:43 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-09-18 04:37:43 +0300 |
commit | 7a53f1445619fc471c2823e7081de8b6039b938e (patch) | |
tree | 961dd0072cc976504fe4570743d801c79512e9a6 /kvmd/plugins/hid/serial.py | |
parent | 45270a09d7b5076bac96887a1e36d752882e3adf (diff) |
refactoring
Diffstat (limited to 'kvmd/plugins/hid/serial.py')
-rw-r--r-- | kvmd/plugins/hid/serial.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 4b8e6165..040828b4 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -44,12 +44,12 @@ class _SerialPhyConnection(BasePhyConnection): def __init__(self, tty: serial.Serial) -> None: self.__tty = tty - def send(self, request: bytes) -> bytes: - assert len(request) == 8 - assert request[0] == 0x33 + def send(self, req: bytes) -> bytes: + assert len(req) == 8 + assert req[0] == 0x33 if self.__tty.in_waiting: self.__tty.read_all() - assert self.__tty.write(request) == 8 + assert self.__tty.write(req) == 8 data = self.__tty.read(4) if len(data) == 4: if data[0] == 0x34: # New response protocol |