Browse Source

partially revert fdb810ba62

283
ThomasV 8 years ago
parent
commit
b436042c89
  1. 6
      plugins/trezor/plugin.py
  2. 3
      plugins/trezor/trezor.py

6
plugins/trezor/plugin.py

@ -97,8 +97,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
pair = [device.path, None]
try:
from trezorlib.transport_hid import HidTransport
return HidTransport(pair)
return self.HidTransport(pair)
except BaseException as e:
raise
self.print_error("cannot connect at", device.path, str(e))
@ -108,8 +107,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
self.print_error("Trying to connect over Trezor Bridge...")
try:
from trezorlib.transport_bridge import BridgeTransport
return BridgeTransport({'path': hexlify(device.path)})
return self.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

@ -14,7 +14,8 @@ 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 DEVICE_IDS
from trezorlib.transport_hid import HidTransport, DEVICE_IDS
from trezorlib.transport_bridge import BridgeTransport
libraries_available = True
except ImportError:
libraries_available = False

Loading…
Cancel
Save