diff options
author | Devaev Maxim <[email protected]> | 2020-10-14 16:59:18 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-10-14 16:59:18 +0300 |
commit | c4dc68bee5a0ae1389ecdf715f556f37d671231e (patch) | |
tree | 2ff35497a39807be270212067a8f1ccea93c8750 /kvmd/plugins/hid/serial.py | |
parent | 1976c0d9ae4337e3cd182074a42339a6f1d77e9d (diff) |
serial hid: perm errors is not fatal
Diffstat (limited to 'kvmd/plugins/hid/serial.py')
-rw-r--r-- | kvmd/plugins/hid/serial.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 17025c48..0eaacfb7 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -372,6 +372,7 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst common_retries = self.__common_retries read_retries = self.__read_retries + error_retval = False while common_retries and read_retries: response = self.__send_request(tty, request) @@ -410,6 +411,7 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst except _RequestError as err: common_retries -= 1 self.__state_flags.update(online=err.online) + error_retval = err.online if live_log_errors: logger.error(err.msg) @@ -430,7 +432,7 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst logger.error(msg) if not (common_retries and read_retries): logger.error("Can't process HID request due many errors: %r", request) - return False + return error_retval def __send_request(self, tty: serial.Serial, request: bytes) -> bytes: if not self.__noop: |