try..except block around load_wallet

This commit is contained in:
ThomasV 2017-09-15 11:51:11 +02:00
parent f0fe84d959
commit 9fc8d94d96
1 changed files with 6 additions and 1 deletions

View File

@ -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)