trezor: quiet user cancelling of passphrase input
This commit is contained in:
parent
0f7d9c9c17
commit
881694d39d
|
@ -23,9 +23,11 @@ class GuiMixin(object):
|
||||||
# BaseClient's unfortunate call() implementation forces us to
|
# BaseClient's unfortunate call() implementation forces us to
|
||||||
# raise exceptions on failure in order to unwind the stack.
|
# raise exceptions on failure in order to unwind the stack.
|
||||||
# However, making the user acknowledge they cancelled
|
# However, making the user acknowledge they cancelled
|
||||||
# gets old very quickly, so we suppress those.
|
# gets old very quickly, so we suppress those. The NotInitialized
|
||||||
|
# one is misnamed and indicates a passphrase request was cancelled.
|
||||||
if msg.code in (self.types.Failure_PinCancelled,
|
if msg.code in (self.types.Failure_PinCancelled,
|
||||||
self.types.Failure_ActionCancelled):
|
self.types.Failure_ActionCancelled,
|
||||||
|
self.types.Failure_NotInitialized):
|
||||||
raise UserCancelled()
|
raise UserCancelled()
|
||||||
raise RuntimeError(msg.message)
|
raise RuntimeError(msg.message)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue