electrum

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

commit ca9eb508217c7d379a1af656db9776feb9e42903
parent 5b96d5166e31984a0ea20e94f326663e7a11ab90
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 28 Oct 2015 11:03:39 +0100

dont create wallet instance twice

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

diff --git a/electrum b/electrum @@ -161,13 +161,13 @@ def init_cmdline(config): print_msg("Wallet saved in '%s'" % wallet.storage.path) - if cmd.name not in ['create', 'restore'] and cmd.requires_wallet and not storage.file_exists: - print_msg("Error: Wallet file not found.") - print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option") - sys.exit(0) - - # create wallet instance - wallet = Wallet(storage) if cmd.requires_wallet else None + else: + if cmd.requires_wallet and not storage.file_exists: + print_msg("Error: Wallet file not found.") + print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option") + sys.exit(0) + # create wallet instance + wallet = Wallet(storage) if cmd.requires_wallet else None # notify plugins always_hook('cmdline_load_wallet', wallet)