def _device_for_path(self, path): return Device( path=path, interface_number=-1, id_=path, product_key=KEEPKEY_PRODUCT_KEY, usage_page=0, transport_ui_string=path, )
def enumerate_devices(self): devices = trezorlib.transport.enumerate_devices() return [Device(path=d.get_path(), interface_number=-1, id_=d.get_path(), product_key=TREZOR_PRODUCT_KEY, usage_page=0, transport_ui_string=d.get_path()) for d in devices]