1
0

trezor: more user friendly when cannot connect

Tell the user and ask if they want to try again.  If they
say no, raise a silent exception.  Apply this more friendly
behaviour to the install wizard too (see issue #1668).
This commit is contained in:
Neil Booth
2016-02-06 19:51:39 +09:00
parent 317e6cea32
commit 16397b1ed7
9 changed files with 51 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
from sys import stderr
from electrum.i18n import _
from electrum.util import PrintError, SilentException
from electrum.util import PrintError, UserCancelled
class GuiMixin(object):
@@ -27,7 +27,7 @@ class GuiMixin(object):
# gets old very quickly, so we suppress those.
if msg.code in (self.types.Failure_PinCancelled,
self.types.Failure_ActionCancelled):
raise SilentException()
raise UserCancelled()
raise RuntimeError(msg.message)
def callback_ButtonRequest(self, msg):