mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 19:11:54 +08:00
refactoring
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user