From 924e32eaab9a9714723494039d0b74676d23fcd2 Mon Sep 17 00:00:00 2001 From: jackjack-jj Date: Tue, 16 Apr 2013 00:20:00 +0200 Subject: [PATCH] fix log bug --- pywallet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pywallet.py b/pywallet.py index 2719a7d..a327970 100755 --- a/pywallet.py +++ b/pywallet.py @@ -1,6 +1,6 @@ #!/usr/bin/env python #-*- coding: utf-8 -*- -pywversion="2.0.1" +pywversion="2.0.2" never_update=False # @@ -2189,6 +2189,7 @@ def read_wallet(json_db, db_env, walletfile, print_wallet, print_wallet_transact if crypted and passphrase: check = True + ppcorrect=True for k in json_db['keys']: if 'encrypted_privkey' in k: ckey = k['encrypted_privkey'].decode('hex') @@ -2203,6 +2204,7 @@ def read_wallet(json_db, db_env, walletfile, print_wallet, print_wallet_transact pkey = EC_KEY(int('0x' + secret.encode('hex'), 16)) if public_key != GetPubKey(pkey, compressed): print "The wallet is crypted and the passphrase is incorrect" + ppcorrect=False break sec = SecretToASecret(secret, compressed) @@ -2215,7 +2217,8 @@ def read_wallet(json_db, db_env, walletfile, print_wallet, print_wallet_transact # del(k['secret']) # del(k['pubkey']) private_keys.append(sec) - print "The wallet is crypted and the passphrase is correct" + if ppcorrect: + print "The wallet is crypted and the passphrase is correct" for k in json_db['keys']: if k['compressed'] and 'secret' in k: