Add a GUI messagebox when using a Trezor but can't connect to the device.

This commit is contained in:
Maran 2014-08-20 20:10:53 +02:00
parent 78469f488a
commit 2afe4e30f7
1 changed files with 3 additions and 1 deletions

View File

@ -133,6 +133,8 @@ class TrezorWallet(NewWallet):
d = HidTransport.enumerate()[0]
self.transport = HidTransport(d)
except:
d = QDialog()
QMessageBox.warning(d, _('Warning'), _('Could not connect to your Trezor. Please verify the cable is connected and that no other app is using it.'), _('OK'))
raise Exception("Trezor not found")
self.client = QtGuiTrezorClient(self.transport)
self.client.set_tx_api(self)