mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-29 17:48:10 +00:00
trezorlib/transport: for get_transport(None), raise exception from None if no trezor is found,
because the IndexError should not be part of the traceback
This commit is contained in:
parent
967d479a19
commit
dc8eec1656
@ -82,7 +82,7 @@ def get_transport(path=None, prefix_search=False):
|
||||
try:
|
||||
return enumerate_devices()[0]
|
||||
except IndexError:
|
||||
raise Exception("No TREZOR device found")
|
||||
raise Exception("No TREZOR device found") from None
|
||||
|
||||
# Find whether B is prefix of A (transport name is part of the path)
|
||||
# or A is prefix of B (path is a prefix, or a name, of transport).
|
||||
|
Loading…
Reference in New Issue
Block a user