mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 13:01:12 +00:00
Test if USB device is presented
This commit is contained in:
parent
8f42da3fcc
commit
1fa4f1eb81
3
cmd.py
3
cmd.py
@ -44,7 +44,10 @@ def get_transport(transport_string, path):
|
|||||||
from bitkeylib.transport_hid import HidTransport
|
from bitkeylib.transport_hid import HidTransport
|
||||||
|
|
||||||
if path == '':
|
if path == '':
|
||||||
|
try:
|
||||||
path = list_usb()[0]
|
path = list_usb()[0]
|
||||||
|
except IndexError:
|
||||||
|
raise Exception("No Trezor found on USB")
|
||||||
|
|
||||||
return HidTransport(path)
|
return HidTransport(path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user