From 7297e949708e24a1cfbf33959ca336477ad5181a Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 31 Mar 2020 15:11:10 +0200 Subject: [PATCH] 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 --- electrum/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 index 309e05783..3291d3bd9 100644 --- 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):