partially revert fdb810ba62

This commit is contained in:
ThomasV 2016-08-13 14:15:29 +02:00
parent 47fef13e5b
commit b436042c89
2 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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