ttrezor: quiet user cancelling of passphrase input - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 881694d39d29b746eab01862189ff0a6fa7ec2a4 DIR parent 0f7d9c9c174b23c16cf1aa65cbf3aded16671944 HTML Author: Neil Booth <kyuupichan@gmail.com> Date: Thu, 11 Feb 2016 16:21:22 +0900 ttrezor: quiet user cancelling of passphrase input Diffstat: M plugins/trezor/clientbase.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- DIR diff --git a/plugins/trezor/clientbase.py b/plugins/trezor/clientbase.py t@@ -23,9 +23,11 @@ class GuiMixin(object): # BaseClient's unfortunate call() implementation forces us to # raise exceptions on failure in order to unwind the stack. # 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, - self.types.Failure_ActionCancelled): + self.types.Failure_ActionCancelled, + self.types.Failure_NotInitialized): raise UserCancelled() raise RuntimeError(msg.message)