mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
qt main_window change_password_dialog: catch InvalidPassword instead
This commit is contained in:
parent
9837a02c95
commit
1bc5640636
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ from electrum.i18n import _
|
||||||
from electrum.util import (format_time, format_satoshis, PrintError,
|
from electrum.util import (format_time, format_satoshis, PrintError,
|
||||||
format_satoshis_plain, NotEnoughFunds,
|
format_satoshis_plain, NotEnoughFunds,
|
||||||
UserCancelled, NoDynamicFeeEstimates, profiler,
|
UserCancelled, NoDynamicFeeEstimates, profiler,
|
||||||
export_meta, import_meta, bh2u, bfh)
|
export_meta, import_meta, bh2u, bfh, InvalidPassword)
|
||||||
from electrum import Transaction
|
from electrum import Transaction
|
||||||
from electrum import util, bitcoin, commands, coinchooser
|
from electrum import util, bitcoin, commands, coinchooser
|
||||||
from electrum import paymentrequest
|
from electrum import paymentrequest
|
||||||
|
@ -1972,10 +1972,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
self.wallet.update_password(old_password, new_password, encrypt_file)
|
self.wallet.update_password(old_password, new_password, encrypt_file)
|
||||||
except BaseException as e:
|
except InvalidPassword as e:
|
||||||
self.show_error(str(e))
|
self.show_error(str(e))
|
||||||
return
|
return
|
||||||
except:
|
except BaseException:
|
||||||
traceback.print_exc(file=sys.stdout)
|
traceback.print_exc(file=sys.stdout)
|
||||||
self.show_error(_('Failed to update password'))
|
self.show_error(_('Failed to update password'))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue