mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
client.has_callback->fix api/readability
This commit is contained in:
parent
e192b38ab6
commit
80f11bff0f
1 changed files with 2 additions and 2 deletions
|
@ -227,7 +227,7 @@ class BaseClient(object):
|
||||||
|
|
||||||
#utility:
|
#utility:
|
||||||
def has_callback(self, method_name):
|
def has_callback(self, method_name):
|
||||||
return (method_name in self.no_callback_list)
|
return not (method_name in self.no_callback_list)
|
||||||
|
|
||||||
def is_localhost(self):
|
def is_localhost(self):
|
||||||
"""Returns True if core is a localhost"""
|
"""Returns True if core is a localhost"""
|
||||||
|
@ -283,7 +283,7 @@ class AClient(BaseClient):
|
||||||
async proxy
|
async proxy
|
||||||
"""
|
"""
|
||||||
def get_method(self, method_name):
|
def get_method(self, method_name):
|
||||||
if self.has_callback(method_name):
|
if not self.has_callback(method_name):
|
||||||
def async_proxy_nocb(*args, **kwargs):
|
def async_proxy_nocb(*args, **kwargs):
|
||||||
return self.core.call(method_name,None, *args, **kwargs)
|
return self.core.call(method_name,None, *args, **kwargs)
|
||||||
return async_proxy_nocb
|
return async_proxy_nocb
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue