From 4d063e287e1bb2010d115325a3c8c6ca7c542bfc Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 12 Feb 2015 12:21:20 +0100 Subject: Remove more threaded= and block= options from the plugins (also, correct a typo) --- slixmpp/plugins/xep_0084/avatar.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'slixmpp/plugins/xep_0084/avatar.py') diff --git a/slixmpp/plugins/xep_0084/avatar.py b/slixmpp/plugins/xep_0084/avatar.py index 7f8eba58..2bae765a 100644 --- a/slixmpp/plugins/xep_0084/avatar.py +++ b/slixmpp/plugins/xep_0084/avatar.py @@ -44,27 +44,25 @@ class XEP_0084(BasePlugin): def generate_id(self, data): return hashlib.sha1(data).hexdigest() - def retrieve_avatar(self, jid, id, url=None, ifrom=None, block=True, + def retrieve_avatar(self, jid, id, url=None, ifrom=None, callback=None, timeout=None): return self.xmpp['xep_0060'].get_item(jid, Data.namespace, id, ifrom=ifrom, - block=block, callback=callback, timeout=timeout) - def publish_avatar(self, data, ifrom=None, block=True, callback=None, + def publish_avatar(self, data, ifrom=None, callback=None, timeout=None): payload = Data() payload['value'] = data return self.xmpp['xep_0163'].publish(payload, id=self.generate_id(data), ifrom=ifrom, - block=block, callback=callback, timeout=timeout) def publish_avatar_metadata(self, items=None, pointers=None, - ifrom=None, block=True, + ifrom=None, callback=None, timeout=None): metadata = MetaData() if items is None: @@ -84,18 +82,15 @@ class XEP_0084(BasePlugin): return self.xmpp['xep_0163'].publish(metadata, id=info['id'], ifrom=ifrom, - block=block, callback=callback, timeout=timeout) - def stop(self, ifrom=None, block=True, callback=None, timeout=None): + def stop(self, ifrom=None, callback=None, timeout=None): """ Clear existing avatar metadata information to stop notifications. Arguments: ifrom -- Specify the sender's JID. - block -- Specify if the send call will block until a response - is received, or a timeout occurs. Defaults to True. timeout -- The length of time (in seconds) to wait for a response before exiting the send call if blocking is used. Defaults to slixmpp.xmlstream.RESPONSE_TIMEOUT @@ -106,6 +101,5 @@ class XEP_0084(BasePlugin): return self.xmpp['xep_0163'].publish(metadata, node=MetaData.namespace, ifrom=ifrom, - block=block, callback=callback, timeout=timeout) -- cgit v1.2.3