ttry..except block around load_wallet - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 9fc8d94d9615ed7d3684fc2296c9a93e1ea7f797
DIR parent f0fe84d959d16c090cfd793efebf6af7d2d06a04
HTML Author: ThomasV <thomasv@electrum.org>
Date: Fri, 15 Sep 2017 11:51:11 +0200
ttry..except block around load_wallet
Diffstat:
M gui/qt/__init__.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
DIR diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py
t@@ -171,7 +171,12 @@ class ElectrumGui:
w.bring_to_top()
break
else:
- wallet = self.daemon.load_wallet(path, None)
+ try:
+ wallet = self.daemon.load_wallet(path, None)
+ except BaseException as e:
+ d = QMessageBox(QMessageBox.Warning, _('Error'), 'Cannot load wallet:\n' + str(e))
+ d.exec_()
+ return
if not wallet:
storage = WalletStorage(path)
wizard = InstallWizard(self.config, self.app, self.plugins, storage)