mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
don't try to open window if started in daemon mode
This commit is contained in:
parent
0fa38074de
commit
0e2db1e0ca
1 changed files with 7 additions and 2 deletions
9
electrum
9
electrum
|
@ -295,8 +295,11 @@ class ClientThread(util.DaemonThread):
|
||||||
config = SimpleConfig(config_options)
|
config = SimpleConfig(config_options)
|
||||||
cmd = config.get('cmd')
|
cmd = config.get('cmd')
|
||||||
if cmd == 'gui':
|
if cmd == 'gui':
|
||||||
self.server.gui.new_window(config)
|
if self.server.gui:
|
||||||
response = "ok"
|
self.server.gui.new_window(config)
|
||||||
|
response = "ok"
|
||||||
|
else:
|
||||||
|
response = "Error: Electrum daemon is running"
|
||||||
elif cmd == 'daemon':
|
elif cmd == 'daemon':
|
||||||
sub = config.get('subcommand')
|
sub = config.get('subcommand')
|
||||||
assert sub in ['start', 'stop', 'status']
|
assert sub in ['start', 'stop', 'status']
|
||||||
|
@ -340,6 +343,8 @@ class NetworkServer(util.DaemonThread):
|
||||||
self.lock = threading.RLock()
|
self.lock = threading.RLock()
|
||||||
# each GUI is a client of the daemon
|
# each GUI is a client of the daemon
|
||||||
self.clients = []
|
self.clients = []
|
||||||
|
# gui is None is we run as daemon
|
||||||
|
self.gui = None
|
||||||
|
|
||||||
def add_client(self, client):
|
def add_client(self, client):
|
||||||
for key in ['fee', 'status', 'banner', 'updated', 'servers', 'interfaces']:
|
for key in ['fee', 'status', 'banner', 'updated', 'servers', 'interfaces']:
|
||||||
|
|
Loading…
Add table
Reference in a new issue