Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight authored and yura-pakhuchiy committed Jul 14, 2018
1 parent a92e057 commit 22d578c
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions plugins/trezor/trezor.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,28 @@ def enumerate(self):
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():
Expand Down

0 comments on commit 22d578c

Please sign in to comment.