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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user