mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-04 23:53:23 +00:00
client.has_callback->fix api/readability
This commit is contained in:
parent
e192b38ab6
commit
80f11bff0f
@ -227,7 +227,7 @@ class BaseClient(object):
|
||||
|
||||
#utility:
|
||||
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):
|
||||
"""Returns True if core is a localhost"""
|
||||
@ -283,7 +283,7 @@ class AClient(BaseClient):
|
||||
async proxy
|
||||
"""
|
||||
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):
|
||||
return self.core.call(method_name,None, *args, **kwargs)
|
||||
return async_proxy_nocb
|
||||
|
Loading…
x
Reference in New Issue
Block a user