electrum

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

commit 1427d962499ff1f8dca56b3474a1e0173b211524
parent ed1001bf8b6bd311e4fd1796f9e06c808bac8e47
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 28 Jun 2015 19:59:27 +0200

trezor: simplify get_client

Diffstat:
Mplugins/trezor.py | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/plugins/trezor.py b/plugins/trezor.py @@ -97,13 +97,10 @@ class Plugin(BasePlugin): give_error('please install github.com/trezor/python-trezor') if not self.client or self.client.bad: - try: - d = HidTransport.enumerate()[0] - self.transport = HidTransport(d) - except: - import traceback - traceback.print_exc(file=sys.stdout) + d = HidTransport.enumerate() + if not d: give_error('Could not connect to your Trezor. Please verify the cable is connected and that no other app is using it.') + self.transport = HidTransport(d[0]) self.client = QtGuiTrezorClient(self.transport) self.client.handler = self.handler self.client.set_tx_api(self)