setconfig: return False on error
This commit is contained in:
2
electrum
2
electrum
@@ -288,7 +288,7 @@ def run_cmdline(config):
|
|||||||
if cmd.requires_network and not config.get('offline'):
|
if cmd.requires_network and not config.get('offline'):
|
||||||
s = get_daemon(config, False)
|
s = get_daemon(config, False)
|
||||||
if not s:
|
if not s:
|
||||||
print_msg("Network daemon is not running. Try 'electrum daemon start'")
|
print_msg("Network daemon is not running. Try 'electrum daemon start'\nIf you want to run this command offline, use the -o flag.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
network = NetworkProxy(s, config)
|
network = NetworkProxy(s, config)
|
||||||
network.start()
|
network.start()
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ class Commands:
|
|||||||
try:
|
try:
|
||||||
value = ast.literal_eval(value)
|
value = ast.literal_eval(value)
|
||||||
except:
|
except:
|
||||||
pass
|
return False
|
||||||
self.config.set_key(key, value, True)
|
self.config.set_key(key, value)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@command('')
|
@command('')
|
||||||
|
|||||||
Reference in New Issue
Block a user