a couple of fixes to stop the webui crashing when running within the gtkui

This commit is contained in:
Damien Churchill 2010-07-18 23:11:02 +01:00
parent ca22e84858
commit 46a967fb8c
2 changed files with 11 additions and 2 deletions

View File

@ -410,7 +410,10 @@ class WebApi(JSONComponent):
self.host_list = ConfigManager("hostlist.conf.1.2", DEFAULT_HOSTS)
self.core_config = CoreConfig()
self.event_queue = EventQueue()
self.sessionproxy = SessionProxy()
try:
self.sessionproxy = component.get("SessionProxy")
except KeyError:
self.sessionproxy = SessionProxy()
def get_host(self, host_id):
"""

View File

@ -188,7 +188,13 @@ class Render(resource.Resource):
return compress(template.render(), request)
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):
request.tracker_name = path