summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-10-14 16:59:18 +0300
committerDevaev Maxim <[email protected]>2020-10-14 16:59:18 +0300
commitc4dc68bee5a0ae1389ecdf715f556f37d671231e (patch)
tree2ff35497a39807be270212067a8f1ccea93c8750 /kvmd
parent1976c0d9ae4337e3cd182074a42339a6f1d77e9d (diff)
serial hid: perm errors is not fatal
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/plugins/hid/serial.py4
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: