mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-10 10:28:39 +00:00
a couple of fixes to stop the webui crashing when running within the gtkui
This commit is contained in:
parent
1ce480ff23
commit
de85e1dcdc
2 changed files with 11 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue