mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-23 07:58:09 +00:00
transport: fit log messages to lines
This commit is contained in:
parent
85b85c67b3
commit
93d84539bd
@ -104,24 +104,16 @@ def all_transports() -> Iterable[Type[Transport]]:
|
||||
def enumerate_devices() -> Iterable[Transport]:
|
||||
devices = [] # type: List[Transport]
|
||||
for transport in all_transports():
|
||||
name = transport.__name__
|
||||
try:
|
||||
found = transport.enumerate()
|
||||
LOG.info(
|
||||
"Enumerating {}: found {} devices".format(
|
||||
transport.__name__, len(found)
|
||||
)
|
||||
)
|
||||
LOG.info("Enumerating {}: found {} devices".format(name, len(found)))
|
||||
devices.extend(found)
|
||||
except NotImplementedError:
|
||||
LOG.error(
|
||||
"{} does not implement device enumeration".format(transport.__name__)
|
||||
)
|
||||
LOG.error("{} does not implement device enumeration".format(name))
|
||||
except Exception as e:
|
||||
LOG.error(
|
||||
"Failed to enumerate {}. {}: {}".format(
|
||||
transport.__name__, e.__class__.__name__, e
|
||||
)
|
||||
)
|
||||
excname = e.__class__.__name__
|
||||
LOG.error("Failed to enumerate {}. {}: {}".format(name, excname, e))
|
||||
return devices
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user