tcheck password for all commands that require password - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 889eb101ffc637c1ccf4c91ad8a57feeb671b6bf
DIR parent ed1fe712381b99d7b125e7541c68599c54db3c0c
HTML Author: thomasv <thomasv@gitorious>
Date: Tue, 20 Dec 2011 14:22:31 +0100
check password for all commands that require password
Diffstat:
M client/electrum.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
DIR diff --git a/client/electrum.py b/client/electrum.py
t@@ -814,14 +814,14 @@ if __name__ == '__main__':
# commands needing password
if cmd in ['payto', 'password', 'mktx', 'seed', 'import' ] or ( cmd=='addresses' and options.show_keys):
password = getpass.getpass('Password:') if wallet.use_encryption else None
-
- if cmd == 'import':
- # decode seed in order to check password
+ # check password
try:
- seed = wallet.pw_decode( wallet.seed, password)
+ wallet.pw_decode( wallet.seed, password)
except:
print "invalid password"
exit(1)
+
+ if cmd == 'import':
keypair = args[1]
if wallet.import_key(keypair,password):
print "keypair imported"