Browse Source
qt wizard: catch wallet/bitcoin exceptions (regression)
fix #5342
regtest_lnd
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
6 additions and
6 deletions
-
electrum/gui/qt/__init__.py
|
|
@ -233,7 +233,12 @@ class ElectrumGui(Logger): |
|
|
|
if not app_is_starting: |
|
|
|
return |
|
|
|
if not wallet: |
|
|
|
wallet = self._start_wizard_to_select_or_create_wallet(path) |
|
|
|
try: |
|
|
|
wallet = self._start_wizard_to_select_or_create_wallet(path) |
|
|
|
except (WalletFileException, BitcoinException) as e: |
|
|
|
self.logger.exception('') |
|
|
|
QMessageBox.warning(None, _('Error'), |
|
|
|
_('Cannot load wallet') + ' (2):\n' + str(e)) |
|
|
|
if not wallet: |
|
|
|
return |
|
|
|
# create or raise window |
|
|
@ -275,11 +280,6 @@ class ElectrumGui(Logger): |
|
|
|
return |
|
|
|
except WalletAlreadyOpenInMemory as e: |
|
|
|
return e.wallet |
|
|
|
except (WalletFileException, BitcoinException) as e: |
|
|
|
self.logger.exception('') |
|
|
|
QMessageBox.warning(None, _('Error'), |
|
|
|
_('Cannot load wallet') + ' (2):\n' + str(e)) |
|
|
|
return |
|
|
|
finally: |
|
|
|
wizard.terminate() |
|
|
|
# return if wallet creation is not complete |
|
|
|