electrum

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

commit 38d94bfa7a25dc575fa472e84b69afe01872119d
parent 1bc564063611425df15766e9847213629b7351cf
Author: SomberNight <somber.night@protonmail.com>
Date:   Thu, 15 Mar 2018 13:06:21 +0100

fix #4082

Diffstat:
Mplugins/trezor/trezor.py | 27++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/plugins/trezor/trezor.py b/plugins/trezor/trezor.py @@ -132,11 +132,28 @@ class TrezorPlugin(HW_PluginBase): except ImportError: # compat for trezorlib < 0.9.2 def all_transports(): - from trezorlib.transport_bridge import BridgeTransport - from trezorlib.transport_hid import HidTransport - from trezorlib.transport_udp import UdpTransport - from trezorlib.transport_webusb import WebUsbTransport - return (BridgeTransport, HidTransport, UdpTransport, WebUsbTransport) + transports = [] + try: + from trezorlib.transport_bridge import BridgeTransport + transports.append(BridgeTransport) + except BaseException: + pass + try: + from trezorlib.transport_hid import HidTransport + transports.append(HidTransport) + except BaseException: + pass + try: + from trezorlib.transport_udp import UdpTransport + transports.append(UdpTransport) + except BaseException: + pass + try: + from trezorlib.transport_webusb import WebUsbTransport + transports.append(WebUsbTransport) + except BaseException: + pass + return transports devices = [] for transport in all_transports():