refactoring

This commit is contained in:
Maxim Devaev
2024-09-18 04:37:43 +03:00
parent 45270a09d7
commit 7a53f14456
83 changed files with 517 additions and 516 deletions

View File

@@ -150,9 +150,9 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
assert channel is not None
self.__send_channel(tty, channel)
except Exception as err:
except Exception as ex:
self.__channel_queue.put_nowait(None)
if isinstance(err, serial.SerialException) and err.errno == errno.ENOENT: # pylint: disable=no-member
if isinstance(ex, serial.SerialException) and ex.errno == errno.ENOENT: # pylint: disable=no-member
logger.error("Missing %s serial device: %s", self, self.__device_path)
else:
logger.exception("Unexpected %s error", self)