commit 1bc564063611425df15766e9847213629b7351cf
parent 9837a02c951a505e7a13fab3867e894f9e54d9d2
Author: SomberNight <somber.night@protonmail.com>
Date: Thu, 15 Mar 2018 08:25:31 +0100
qt main_window change_password_dialog: catch InvalidPassword instead
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -47,7 +47,7 @@ from electrum.i18n import _
from electrum.util import (format_time, format_satoshis, PrintError,
format_satoshis_plain, NotEnoughFunds,
UserCancelled, NoDynamicFeeEstimates, profiler,
- export_meta, import_meta, bh2u, bfh)
+ export_meta, import_meta, bh2u, bfh, InvalidPassword)
from electrum import Transaction
from electrum import util, bitcoin, commands, coinchooser
from electrum import paymentrequest
@@ -1972,10 +1972,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
return
try:
self.wallet.update_password(old_password, new_password, encrypt_file)
- except BaseException as e:
+ except InvalidPassword as e:
self.show_error(str(e))
return
- except:
+ except BaseException:
traceback.print_exc(file=sys.stdout)
self.show_error(_('Failed to update password'))
return