1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

Test if USB device is presented

This commit is contained in:
slush 2013-08-31 23:45:53 +02:00
parent 8f42da3fcc
commit 1fa4f1eb81

3
cmd.py
View File

@ -44,7 +44,10 @@ def get_transport(transport_string, path):
from bitkeylib.transport_hid import HidTransport
if path == '':
try:
path = list_usb()[0]
except IndexError:
raise Exception("No Trezor found on USB")
return HidTransport(path)