commit 76dd11783b56a1f4fd5d26b539989025a5e098bc
parent e83d2b87723d378da8b15e0d2242a557d33687b3
Author: ThomasV <thomasv@electrum.org>
Date: Sun, 5 Mar 2017 20:25:42 +0100
rename load_wallet command
Diffstat:
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/electrum b/electrum
@@ -379,7 +379,7 @@ if __name__ == '__main__':
elif cmdname == 'daemon':
subcommand = config.get('subcommand')
- if subcommand in ['open_wallet']:
+ if subcommand in ['load_wallet']:
init_daemon(config_options)
if subcommand in [None, 'start']:
diff --git a/lib/commands.py b/lib/commands.py
@@ -793,7 +793,7 @@ def get_parser():
add_global_options(parser_gui)
# daemon
parser_daemon = subparsers.add_parser('daemon', help="Run Daemon")
- parser_daemon.add_argument("subcommand", choices=['start', 'status', 'stop', 'open_wallet', 'close_wallet'], nargs='?')
+ parser_daemon.add_argument("subcommand", choices=['start', 'status', 'stop', 'load_wallet', 'close_wallet'], nargs='?')
#parser_daemon.set_defaults(func=run_daemon)
add_network_options(parser_daemon)
add_global_options(parser_daemon)
diff --git a/lib/daemon.py b/lib/daemon.py
@@ -147,10 +147,10 @@ class Daemon(DaemonThread):
def run_daemon(self, config_options):
config = SimpleConfig(config_options)
sub = config.get('subcommand')
- assert sub in [None, 'start', 'stop', 'status', 'open_wallet', 'close_wallet']
+ assert sub in [None, 'start', 'stop', 'status', 'load_wallet', 'close_wallet']
if sub in [None, 'start']:
response = "Daemon already running"
- elif sub == 'open_wallet':
+ elif sub == 'load_wallet':
path = config.get_wallet_path()
self.load_wallet(path, lambda: config.get('password'))
response = True
@@ -245,7 +245,7 @@ class Daemon(DaemonThread):
path = config.get_wallet_path()
wallet = self.wallets.get(path)
if wallet is None:
- return {'error': 'Wallet not open. Use "electrum daemon open -w wallet"'}
+ return {'error': 'Wallet not open. Use "electrum daemon load_wallet"'}
else:
wallet = None
# arguments passed to function