Browse Source

Merge branch 'master' of git://github.com/spesmilo/electrum

283
ThomasV 9 years ago
parent
commit
0328caa22a
  1. 8
      plugins/trezor/plugin.py
  2. 3
      plugins/trezor/trezor.py

8
plugins/trezor/plugin.py

@ -106,15 +106,19 @@ class TrezorCompatiblePlugin(HW_PluginBase):
pair = [device.path, None]
try:
return self.HidTransport(pair)
from trezorlib.transport_hid import HidTransport
return HidTransport(pair)
except BaseException as e:
raise
self.print_error("cannot connect at", device.path, str(e))
return None
def _try_bridge(self, device):
self.print_error("Trying to connect over Trezor Bridge...")
try:
return self.BridgeTransport({'path': hexlify(device.path)})
from trezorlib.transport_bridge import BridgeTransport
return BridgeTransport({'path': hexlify(device.path)})
except BaseException as e:
self.print_error("cannot connect to bridge", str(e))
return None

3
plugins/trezor/trezor.py

@ -15,8 +15,7 @@ class TrezorPlugin(TrezorCompatiblePlugin):
from .client import TrezorClient as client_class
import trezorlib.ckd_public as ckd_public
from trezorlib.client import types
from trezorlib.transport_hid import HidTransport, DEVICE_IDS
from trezorlib.transport_bridge import BridgeTransport
from trezorlib.transport_hid import DEVICE_IDS
libraries_available = True
except ImportError:
libraries_available = False

Loading…
Cancel
Save