electrum

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

commit 4db1535bceeb58bfb8e46d83de45fa56cca352b2
parent d2a80f15a189f0de605814a5a39f6cec7ef62681
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon, 13 May 2019 22:56:38 +0200

qt wizard: catch wallet/bitcoin exceptions (regression)

fix #5342

Diffstat:
Melectrum/gui/qt/__init__.py | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/electrum/gui/qt/__init__.py b/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