From d48ecc990ab887b4de6827a728cc6ebec2b7a259 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 9 Oct 2017 02:16:04 +0200 Subject: [PATCH] fix: [QT wallet wizard] catch exceptions: UserCancelled, GoBack --- gui/qt/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py index 33f08ff7c..679d85974 100644 --- a/gui/qt/__init__.py +++ b/gui/qt/__init__.py @@ -42,7 +42,7 @@ from electrum.plugins import run_hook from electrum import SimpleConfig, Wallet, WalletStorage from electrum.synchronizer import Synchronizer from electrum.verifier import SPV -from electrum.util import DebugMem, UserCancelled, InvalidPassword +from electrum.util import DebugMem, UserCancelled, InvalidPassword, print_error from electrum.wallet import Abstract_Wallet from .installwizard import InstallWizard, GoBack @@ -191,7 +191,12 @@ class ElectrumGui: if not wallet: storage = WalletStorage(path) wizard = InstallWizard(self.config, self.app, self.plugins, storage) - wallet = wizard.run_and_get_wallet() + try: + wallet = wizard.run_and_get_wallet() + except UserCancelled: + pass + except GoBack as e: + print_error('[start_new_window] Exception caught (GoBack)', e) wizard.terminate() if not wallet: return