commit b69cb213335481aeb3d7d9363d4871159d427d51
parent b16800864b3acf29fc9487e64ef3f3ad986d3237
Author: ThomasV <thomasv@electrum.org>
Date: Sat, 7 Jan 2017 08:57:25 +0100
Qt: catch exception raised by load_wallet
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git 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: