commit bf8821f2433c9ead0d36fab8686a39df03a3d6d9
parent 63cbda1bd318d74aeeae2bebe51400debed8beea
Author: ThomasV <thomasv@gitorious>
Date: Tue, 29 Nov 2011 14:52:13 +0100
minor
Diffstat:
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/client/upgrade.py b/client/upgrade.py
@@ -1,6 +1,11 @@
-import electrum, getpass, base64,ast
+import electrum, getpass, base64,ast,sys
-wallet = electrum.Wallet(None)
+
+try:
+ path = sys.argv[1]
+else:
+ path = None
+wallet = electrum.Wallet(path)
try:
wallet.read()
print "ok"
@@ -15,8 +20,7 @@ except BaseException:
EncodeAES = lambda secret, s: base64.b64encode(AES.new(secret).encrypt(pad(s)))
DecodeAES = lambda secret, e: AES.new(secret).decrypt(base64.b64decode(e)).rstrip(PADDING)
- print "encrypted seed", wallet.seed
- print "please provide your password"
+ print "please enter your password"
password = getpass.getpass("Password:")
secret = electrum.Hash(password)
try:
@@ -25,10 +29,8 @@ except BaseException:
except:
print "sorry"
exit(1)
- print seed
- print private_keys
wallet.version = 2
wallet.seed = wallet.pw_encode( seed, password)
wallet.private_keys = wallet.pw_encode( repr( private_keys ), password)
wallet.save()
- print "wallet was upgraded"
+ print "upgrade successful"