diff options
-rw-r--r-- | slixmpp/plugins/xep_0009/remote.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0009/remote.py b/slixmpp/plugins/xep_0009/remote.py index 6fa85cc7..f3e64fb3 100644 --- a/slixmpp/plugins/xep_0009/remote.py +++ b/slixmpp/plugins/xep_0009/remote.py @@ -405,8 +405,10 @@ class Proxy(Endpoint): self._callback = callback def __getattribute__(self, name, *args): - if name in ('__dict__', '_endpoint', 'async', '_callback'): + if name in ('__dict__', '_endpoint', '_callback'): return object.__getattribute__(self, name) + elif name == 'async': + return lambda callback: Proxy(self._endpoint, callback) else: attribute = self._endpoint.__getattribute__(name) if hasattr(attribute, '__call__'): @@ -420,9 +422,6 @@ class Proxy(Endpoint): pass # If the attribute doesn't exist, don't care! return attribute - def async(self, callback): - return Proxy(self._endpoint, callback) - def get_endpoint(self): ''' Returns the proxified endpoint. |