follow up c810c6a356
This commit is contained in:
parent
26becedfb2
commit
3f3d249ed1
6
electrum
6
electrum
|
@ -288,10 +288,12 @@ def run_offline_command(config, config_options):
|
|||
# decode json arguments
|
||||
args = list(map(json_decode, args))
|
||||
# options
|
||||
args += [(config_options.get(x) if x in ['password', 'new_password'] else config.get(x)) for x in cmd.options]
|
||||
kwargs = {}
|
||||
for x in cmd.options:
|
||||
kwargs[x] = (config_options.get(x) if x in ['password', 'new_password'] else config.get(x))
|
||||
cmd_runner = Commands(config, wallet, None)
|
||||
func = getattr(cmd_runner, cmd.name)
|
||||
result = func(*args)
|
||||
result = func(*args, **kwargs)
|
||||
# save wallet
|
||||
if wallet:
|
||||
wallet.storage.write()
|
||||
|
|
|
@ -259,10 +259,12 @@ class Daemon(DaemonThread):
|
|||
# decode json arguments
|
||||
args = [json_decode(i) for i in args]
|
||||
# options
|
||||
args += list(map(lambda x: (config_options.get(x) if x in ['password', 'new_password'] else config.get(x)), cmd.options))
|
||||
kwargs = {}
|
||||
for x in cmd.options:
|
||||
kwargs[x] = (config_options.get(x) if x in ['password', 'new_password'] else config.get(x))
|
||||
cmd_runner = Commands(config, wallet, self.network)
|
||||
func = getattr(cmd_runner, cmd.name)
|
||||
result = func(*args)
|
||||
result = func(*args, **kwargs)
|
||||
return result
|
||||
|
||||
def run(self):
|
||||
|
|
Loading…
Reference in New Issue