From b5c0cc61902bd912e979f73fa0fe46c32b3c23bc Mon Sep 17 00:00:00 2001 From: ecdsa Date: Mon, 29 Apr 2013 10:41:46 +0200 Subject: [PATCH] handle exceptions returned by update_password --- gui/gui_classic.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/gui_classic.py b/gui/gui_classic.py index 45b86c7c8..de5e561f1 100644 --- a/gui/gui_classic.py +++ b/gui/gui_classic.py @@ -1584,7 +1584,14 @@ class ElectrumWindow(QMainWindow): QMessageBox.warning(parent, _('Error'), _('Passwords do not match'), _('OK')) return ElectrumWindow.change_password_dialog(wallet, parent) # Retry - wallet.update_password(seed, password, new_password) + try: + wallet.update_password(seed, password, new_password) + except: + QMessageBox.warning(parent, _('Error'), _('Failed to update password'), _('OK')) + return + + QMessageBox.information(parent, _('Success'), _('Password was updated successfully'), _('OK')) + if parent: icon = QIcon(":icons/lock.png") if wallet.use_encryption else QIcon(":icons/unlock.png") parent.password_button.setIcon( icon )