electrum

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

commit b8bdcc0877a57b4be8cc35e84a00a94aff10aebd
parent 45f25586ef586c998ae3e24d731a7c3f651d90f2
Author: ThomasV <thomasv@electrum.org>
Date:   Sun,  5 Mar 2017 14:57:41 +0100

rename open close commands

Diffstat:
Melectrum | 2+-
Mlib/commands.py | 2+-
Mlib/daemon.py | 9++++-----
3 files changed, 6 insertions(+), 7 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']: + if subcommand in ['open_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', 'close'], nargs='?') + parser_daemon.add_argument("subcommand", choices=['start', 'status', 'stop', 'open_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,18 +147,17 @@ 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', 'close'] + assert sub in [None, 'start', 'stop', 'status', 'open_wallet', 'close_wallet'] if sub in [None, 'start']: response = "Daemon already running" - elif sub == 'open': + elif sub == 'open_wallet': path = config.get_wallet_path() self.load_wallet(path, lambda: config.get('password')) response = True - elif sub == 'close': + elif sub == 'close_wallet': path = config.get_wallet_path() if path in self.wallets: - wallet = self.wallets.pop(path) - wallet.stop_threads() + self.stop_wallet(path) response = True else: response = False