client.has_callback->fix api/readability
This commit is contained in:
parent
e192b38ab6
commit
80f11bff0f
@ -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…
x
Reference in New Issue
Block a user