mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Merge pull request #3010 from SomberNight/qt_wiz_catch_exc
fix: [QT wallet wizard] catch exceptions: UserCancelled, GoBack
This commit is contained in:
commit
76da6916f3
1 changed files with 7 additions and 2 deletions
|
@ -42,7 +42,7 @@ from electrum.plugins import run_hook
|
||||||
from electrum import SimpleConfig, Wallet, WalletStorage
|
from electrum import SimpleConfig, Wallet, WalletStorage
|
||||||
from electrum.synchronizer import Synchronizer
|
from electrum.synchronizer import Synchronizer
|
||||||
from electrum.verifier import SPV
|
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 electrum.wallet import Abstract_Wallet
|
||||||
|
|
||||||
from .installwizard import InstallWizard, GoBack
|
from .installwizard import InstallWizard, GoBack
|
||||||
|
@ -194,7 +194,12 @@ class ElectrumGui:
|
||||||
if not wallet:
|
if not wallet:
|
||||||
storage = WalletStorage(path)
|
storage = WalletStorage(path)
|
||||||
wizard = InstallWizard(self.config, self.app, self.plugins, storage)
|
wizard = InstallWizard(self.config, self.app, self.plugins, storage)
|
||||||
|
try:
|
||||||
wallet = wizard.run_and_get_wallet()
|
wallet = wizard.run_and_get_wallet()
|
||||||
|
except UserCancelled:
|
||||||
|
pass
|
||||||
|
except GoBack as e:
|
||||||
|
print_error('[start_new_window] Exception caught (GoBack)', e)
|
||||||
wizard.terminate()
|
wizard.terminate()
|
||||||
if not wallet:
|
if not wallet:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue