From 9e60f24c54e50b6d39ec28db53310748ce87df6f Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Thu, 4 Jun 2020 07:54:26 +0300 Subject: fix --- kvmd/plugins/hid/serial.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kvmd/plugins/hid') diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 6f92d9e4..6a6c83ac 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -320,7 +320,6 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst if not self.__noop: if tty.in_waiting: tty.read(tty.in_waiting) - assert tty.write(request) == len(request) response = tty.read(4) else: @@ -333,7 +332,7 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst else: assert len(response) == 4, response if self.__make_crc16(response[-4:-2]) != struct.unpack(">H", response[-2:])[0]: - get_logger().error("Invalid response CRC; requesting response again ...") + logger.error("Invalid response CRC; requesting response again ...") request = self.__make_request(b"\x02\x00\x00\x00\x00") # Repeat an answer else: code = response[1] -- cgit v1.2.3