mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-04 03:42:44 +08:00
refactoring
This commit is contained in:
@@ -157,9 +157,9 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
||||
if self.__protocol == 2:
|
||||
self.__channel_queue.put_nowait(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