1
0

rename open close commands

This commit is contained in:
ThomasV
2017-03-05 14:57:41 +01:00
parent 45f25586ef
commit b8bdcc0877
3 changed files with 6 additions and 7 deletions

View File

@@ -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