a couple of fixes to stop the webui crashing when running within the gtkui
This commit is contained in:
parent
1ce480ff23
commit
de85e1dcdc
@ -410,7 +410,10 @@ class WebApi(JSONComponent):
|
|||||||
self.host_list = ConfigManager("hostlist.conf.1.2", DEFAULT_HOSTS)
|
self.host_list = ConfigManager("hostlist.conf.1.2", DEFAULT_HOSTS)
|
||||||
self.core_config = CoreConfig()
|
self.core_config = CoreConfig()
|
||||||
self.event_queue = EventQueue()
|
self.event_queue = EventQueue()
|
||||||
self.sessionproxy = SessionProxy()
|
try:
|
||||||
|
self.sessionproxy = component.get("SessionProxy")
|
||||||
|
except KeyError:
|
||||||
|
self.sessionproxy = SessionProxy()
|
||||||
|
|
||||||
def get_host(self, host_id):
|
def get_host(self, host_id):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -188,7 +188,13 @@ class Render(resource.Resource):
|
|||||||
return compress(template.render(), request)
|
return compress(template.render(), request)
|
||||||
|
|
||||||
class Tracker(resource.Resource):
|
class Tracker(resource.Resource):
|
||||||
tracker_icons = TrackerIcons()
|
|
||||||
|
def __init__(self):
|
||||||
|
resource.Resource.__init__(self)
|
||||||
|
try:
|
||||||
|
self.tracker_icons = component.get("TrackerIcons")
|
||||||
|
except KeyError:
|
||||||
|
self.tracker_icons = TrackerIcons()
|
||||||
|
|
||||||
def getChild(self, path, request):
|
def getChild(self, path, request):
|
||||||
request.tracker_name = path
|
request.tracker_name = path
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user