mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-14 18:20:30 +08:00
fixed logging
This commit is contained in:
parent
2b2014f7b1
commit
ce4704f7c0
@ -47,17 +47,17 @@ class UsbDeviceController:
|
||||
try:
|
||||
candidates = sorted(os.listdir(path))
|
||||
except Exception as err:
|
||||
logger.error("Can't list %s: %s: %s", path, type(err).__name__, err)
|
||||
logger.error("Can't list %s: %s: %s: ignored", path, type(err).__name__, err)
|
||||
return
|
||||
|
||||
udc = ""
|
||||
if not self.__udc:
|
||||
if len(candidates) == 0:
|
||||
logger.warning("Can't find any UDC: ignored")
|
||||
logger.error("Can't find any UDC: ignored")
|
||||
else:
|
||||
udc = candidates[0]
|
||||
elif self.__udc not in candidates:
|
||||
logger.warning("Can't find selected UDC: %s: ignored", self.__udc)
|
||||
logger.error("Can't find selected UDC: %s: ignored", self.__udc)
|
||||
else:
|
||||
udc = self.__udc
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user