mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +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.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):
|
||||
"""
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue