partially revert fdb810ba62
This commit is contained in:
parent
47fef13e5b
commit
b436042c89
@ -97,8 +97,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
|
|||||||
pair = [device.path, None]
|
pair = [device.path, None]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from trezorlib.transport_hid import HidTransport
|
return self.HidTransport(pair)
|
||||||
return HidTransport(pair)
|
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
raise
|
raise
|
||||||
self.print_error("cannot connect at", device.path, str(e))
|
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...")
|
self.print_error("Trying to connect over Trezor Bridge...")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from trezorlib.transport_bridge import BridgeTransport
|
return self.BridgeTransport({'path': hexlify(device.path)})
|
||||||
return BridgeTransport({'path': hexlify(device.path)})
|
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
self.print_error("cannot connect to bridge", str(e))
|
self.print_error("cannot connect to bridge", str(e))
|
||||||
return None
|
return None
|
||||||
|
|||||||
@ -14,7 +14,8 @@ class TrezorPlugin(TrezorCompatiblePlugin):
|
|||||||
from .client import TrezorClient as client_class
|
from .client import TrezorClient as client_class
|
||||||
import trezorlib.ckd_public as ckd_public
|
import trezorlib.ckd_public as ckd_public
|
||||||
from trezorlib.client import types
|
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
|
libraries_available = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
libraries_available = False
|
libraries_available = False
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user