dont create wallet instance twice
This commit is contained in:
parent
5b96d5166e
commit
ca9eb50821
14
electrum
14
electrum
|
@ -161,13 +161,13 @@ def init_cmdline(config):
|
||||||
|
|
||||||
print_msg("Wallet saved in '%s'" % wallet.storage.path)
|
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:
|
else:
|
||||||
print_msg("Error: Wallet file not found.")
|
if cmd.requires_wallet and not storage.file_exists:
|
||||||
print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option")
|
print_msg("Error: Wallet file not found.")
|
||||||
sys.exit(0)
|
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
|
# create wallet instance
|
||||||
wallet = Wallet(storage) if cmd.requires_wallet else None
|
wallet = Wallet(storage) if cmd.requires_wallet else None
|
||||||
|
|
||||||
# notify plugins
|
# notify plugins
|
||||||
always_hook('cmdline_load_wallet', wallet)
|
always_hook('cmdline_load_wallet', wallet)
|
||||||
|
|
Loading…
Reference in New Issue