electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit b2d66b2a6f0b98722abd1b33f5bfebc68f4fe4d6
parent 00abc60cdc2081b24c0c61fc1af73834b4e45ade
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  3 Mar 2017 16:05:13 +0100

fix unnecessary password request

Diffstat:
Melectrum | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/electrum b/electrum @@ -236,7 +236,7 @@ def init_cmdline(config_options, server): if not storage.is_encrypted(): storage.read(None) # commands needing password - if (storage.is_encrypted() and server is None)\ + if (cmd.requires_wallet and storage.is_encrypted() and server is None)\ or (cmd.requires_password and (storage.get('use_encryption') or storage.is_encrypted())): if config.get('password'): password = config.get('password') @@ -261,9 +261,12 @@ def run_offline_command(config, config_options): cmdname = config.get('cmd') cmd = known_commands[cmdname] password = config_options.get('password') - storage = WalletStorage(config.get_wallet_path()) - storage.read(password if storage.is_encrypted() else None) - wallet = Wallet(storage) if cmd.requires_wallet else None + if cmd.requires_wallet: + storage = WalletStorage(config.get_wallet_path()) + storage.read(password if storage.is_encrypted() else None) + wallet = Wallet(storage) + else: + wallet = None # check password if cmd.requires_password and storage.get('use_encryption'): try: