check that GUI has new_window method

This commit is contained in:
ThomasV 2015-09-01 10:25:20 +02:00
parent 0e2db1e0ca
commit ba2570b8aa

View file

@ -296,10 +296,13 @@ class ClientThread(util.DaemonThread):
cmd = config.get('cmd')
if cmd == 'gui':
if self.server.gui:
self.server.gui.new_window(config)
response = "ok"
if hasattr(server.gui, 'new_window'):
self.server.gui.new_window(config)
response = "ok"
else:
response = "error: current GUI does not support multiple windows"
else:
response = "Error: Electrum daemon is running"
response = "error: Electrum daemon is running"
elif cmd == 'daemon':
sub = config.get('subcommand')
assert sub in ['start', 'stop', 'status']