mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 16:00:57 +00:00
69ef1f0acd
Previously if an import of a dependent module (usb1, hid) failed, import of the whole transport module would fail. This was resolved by catching ImportErrors in the all_transports method. This had two drawbacks: - if something other than ImportError happened - e.g., libusb would raise OSError if it couldn't find libusb.so - all_transports would crash anyway - at the same time, if a legitimately needed dependency (typing_extensions) was missing, this would be masked by the ImportError handling. Instead, we unconditionally import the modules, and inside each one, wrap dependencies in a try-except. As an added benefit, it is now possible to disable a transport just by setting SomeTransport.ENABLED = False |
||
---|---|---|
.. | ||
messages | ||
qt | ||
tests | ||
transport | ||
__init__.py | ||
_ed25519.py | ||
btc.py | ||
cardano.py | ||
ckd_public.py | ||
client.py | ||
coins.py | ||
cosi.py | ||
debuglink.py | ||
device.py | ||
ethereum.py | ||
exceptions.py | ||
firmware.py | ||
lisk.py | ||
log.py | ||
mapping.py | ||
misc.py | ||
monero.py | ||
nem.py | ||
ontology.py | ||
protobuf.py | ||
ripple.py | ||
stellar.py | ||
tezos.py | ||
tools.py | ||
tx_api.py | ||
ui.py |