mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
fix the system.listMethods json call when running in classic mode
This commit is contained in:
parent
161ad0ff0d
commit
13f29a77dd
1 changed files with 10 additions and 1 deletions
|
@ -110,7 +110,16 @@ class JSON(resource.Resource, component.Component):
|
|||
component.Component.__init__(self, "JSON")
|
||||
self._remote_methods = []
|
||||
self._local_methods = {}
|
||||
client.disconnect_callback = self._on_client_disconnect
|
||||
if client.is_classicmode():
|
||||
def on_got_methods(methods):
|
||||
"""
|
||||
Handles receiving the method names
|
||||
"""
|
||||
self._remote_methods = methods
|
||||
|
||||
client.daemon.get_method_list().addCallback(on_got_methods)
|
||||
else:
|
||||
client.disconnect_callback = self._on_client_disconnect
|
||||
|
||||
def connect(self, host="localhost", port=58846, username="", password=""):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue