From b69cb213335481aeb3d7d9363d4871159d427d51 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 7 Jan 2017 08:57:25 +0100 Subject: [PATCH] Qt: catch exception raised by load_wallet --- gui/qt/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py index 37730f822..de23e1b7f 100644 --- a/gui/qt/__init__.py +++ b/gui/qt/__init__.py @@ -159,8 +159,12 @@ class ElectrumGui: w.bring_to_top() break else: - wallet = self.daemon.load_wallet(path) - if not wallet: + try: + wallet = self.daemon.load_wallet(path) + except BaseException as e: + QMessageBox.information(None, _('Error'), str(e), _('OK')) + return + if wallet is None: wizard = InstallWizard(self.config, self.app, self.plugins, path) wallet = wizard.run_and_get_wallet() if not wallet: