electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0328caa22ab787ff37567ee098edc5db96769a88
parent 342d6633a671c0b33721e34693c99925a01c225b
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  1 Jul 2016 11:44:38 +0200

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

Diffstat:
Mplugins/trezor/plugin.py | 8++++++--
Mplugins/trezor/trezor.py | 3+--
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/plugins/trezor/plugin.py b/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 diff --git a/plugins/trezor/trezor.py b/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