[WebUI] Fix attempting to connect to blank host_info
This commit is contained in:
parent
de3a6c443d
commit
bbce304f5a
@ -384,11 +384,11 @@ class WebApi(JSONComponent):
|
|||||||
component.get('Web.PluginManager').start()
|
component.get('Web.PluginManager').start()
|
||||||
else:
|
else:
|
||||||
client.set_disconnect_callback(self._on_client_disconnect)
|
client.set_disconnect_callback(self._on_client_disconnect)
|
||||||
if component.get('DelugeWeb').config['default_daemon']:
|
default_host_id = component.get('DelugeWeb').config['default_daemon']
|
||||||
# Sort out getting the default daemon here
|
if default_host_id:
|
||||||
default_host_id = component.get('DelugeWeb').config['default_daemon']
|
host_info = self._get_host(default_host_id)
|
||||||
host_info = component.get('Web')._get_host(default_host_id)
|
if host_info:
|
||||||
return self._connect_daemon(*host_info[1:])
|
return self._connect_daemon(*host_info[1:])
|
||||||
|
|
||||||
return defer.succeed(True)
|
return defer.succeed(True)
|
||||||
|
|
||||||
@ -725,7 +725,6 @@ class WebApi(JSONComponent):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
def response(result):
|
def response(result):
|
||||||
log.critical('%s', result)
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
return self.hostlist.get_host_status(host_id).addCallback(response)
|
return self.hostlist.get_host_status(host_id).addCallback(response)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user