commit 9cafc3db2d4f26b83aeced21df4ecdf632cbdb0f
parent 21ad805010f4c6308763d1d034d5af98abfc6565
Author: ThomasV <thomasv@electrum.org>
Date: Fri, 7 Oct 2016 00:20:46 +0200
fix #1954
Diffstat:
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/lib/keystore.py b/lib/keystore.py
@@ -186,15 +186,13 @@ class Imported_KeyStore(Software_KeyStore):
return (False, i)
def update_password(self, old_password, new_password):
- if old_password is not None:
- self.check_password(old_password)
+ self.check_password(old_password)
if new_password == '':
new_password = None
for k, v in self.keypairs.items():
b = pw_decode(v, old_password)
c = pw_encode(b, new_password)
self.keypairs[k] = c
- print self.keypairs
class Deterministic_KeyStore(Software_KeyStore):
@@ -317,8 +315,7 @@ class BIP32_KeyStore(Deterministic_KeyStore, Xpub):
raise InvalidPassword()
def update_password(self, old_password, new_password):
- if old_password is not None:
- self.check_password(old_password)
+ self.check_password(old_password)
if new_password == '':
new_password = None
if self.has_seed():
@@ -485,8 +482,7 @@ class Old_KeyStore(Deterministic_KeyStore):
return derivation
def update_password(self, old_password, new_password):
- if old_password is not None:
- self.check_password(old_password)
+ self.check_password(old_password)
if new_password == '':
new_password = None
if self.has_seed():