Beispiel #1
0
 def enumerate(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]
Beispiel #2
0
 def enumerate(self):
     devices = self.transport_handler.enumerate_devices()
     return [Device(path=d.get_path(),
                    interface_number=-1,
                    id_=d.get_path(),
                    product_key='TREZOR',
                    usage_page=0,
                    transport_ui_string=d.get_path())
             for d in devices]
Beispiel #3
0
 def enumerate(self):
     # If there is a bridge, prefer that.
     # On Windows, the bridge runs as Admin (and Electrum usually does not),
     # so the bridge has better chances of finding devices. see #5420
     # This also avoids duplicate entries.
     try:
         call_bridge("enumerate")
     except Exception:
         devices = trezorlib.transport.enumerate_devices()
     else:
         devices = BridgeTransport.enumerate()
     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
     ]
Beispiel #4
0
 def enumerate(self):
     devices = self.transport_handler.enumerate_devices()
     return [Device(d.get_path(), -1, d.get_path(), 'TREZOR', 0) for d in devices]