electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 7297e949708e24a1cfbf33959ca336477ad5181a
parent 6760c3f252797d137ebceee5a71a7a86025f12ad
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 31 Mar 2020 15:11:10 +0200

hw wallets: handle cancellation for "query_choice" in wizard

E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\plugins\hw_wallet\qt.py", line 193, in win_query_choice
    self.choice = self.win.query_choice(msg, labels)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 545, in query_choice
    self.exec_layout(vbox, '')
  File "...\electrum\electrum\gui\qt\installwizard.py", line 392, in exec_layout
    raise UserCancelled
electrum.util.UserCancelled

Diffstat:
Melectrum/plugins/hw_wallet/qt.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/electrum/plugins/hw_wallet/qt.py b/electrum/plugins/hw_wallet/qt.py @@ -190,7 +190,10 @@ class QtHandlerBase(HardwareHandlerBase, QObject, Logger): self.dialog = None def win_query_choice(self, msg, labels): - self.choice = self.win.query_choice(msg, labels) + try: + self.choice = self.win.query_choice(msg, labels) + except UserCancelled: + self.choice = None self.done.set() def win_yes_no_question(self, msg):