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:
@@ -21,8 +21,10 @@ class InvalidPassword(Exception):
|
||||
def __str__(self):
|
||||
return _("Incorrect password")
|
||||
|
||||
class SilentException(Exception):
|
||||
'''An exception that should probably be suppressed from the user'''
|
||||
# Throw this exception to unwind the stack like when an error occurs.
|
||||
# However unlike other exceptions the user won't be informed.
|
||||
class UserCancelled(Exception):
|
||||
'''An exception that is suppressed from the user'''
|
||||
pass
|
||||
|
||||
class MyEncoder(json.JSONEncoder):
|
||||
|
||||
Reference in New Issue
Block a user