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_0065/proxy.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'slixmpp/plugins/xep_0065/proxy.py') diff --git a/slixmpp/plugins/xep_0065/proxy.py b/slixmpp/plugins/xep_0065/proxy.py index a1c2bc60..766c46cf 100644 --- a/slixmpp/plugins/xep_0065/proxy.py +++ b/slixmpp/plugins/xep_0065/proxy.py @@ -92,7 +92,7 @@ class XEP_0065(BasePlugin): self.xmpp.event('stream:%s:%s' % (sid, to), socket) return socket - def request_stream(self, to, sid=None, ifrom=None, block=True, timeout=None, callback=None): + def request_stream(self, to, sid=None, ifrom=None, timeout=None, callback=None): if sid is None: sid = uuid4().hex @@ -107,7 +107,7 @@ class XEP_0065(BasePlugin): iq['socks']['sid'] = sid for proxy, (host, port) in self._proxies.items(): iq['socks'].add_streamhost(proxy, host, port) - return iq.send(block=block, timeout=timeout, callback=callback) + return iq.send(timeout=timeout, callback=callback) def discover_proxies(self, jid=None, ifrom=None, timeout=None): """Auto-discover the JIDs of SOCKS5 proxies on an XMPP server.""" @@ -143,11 +143,11 @@ class XEP_0065(BasePlugin): return self._proxies - def get_network_address(self, proxy, ifrom=None, block=True, timeout=None, callback=None): + def get_network_address(self, proxy, ifrom=None, timeout=None, callback=None): """Get the network information of a proxy.""" iq = self.xmpp.Iq(sto=proxy, stype='get', sfrom=ifrom) iq.enable('socks') - return iq.send(block=block, timeout=timeout, callback=callback) + return iq.send(timeout=timeout, callback=callback) def _handle_streamhost(self, iq): """Handle incoming SOCKS5 session request.""" @@ -187,12 +187,12 @@ class XEP_0065(BasePlugin): self.xmpp.event('socks5_stream', conn) self.xmpp.event('stream:%s:%s' % (sid, conn.peer_jid), conn) - def activate(self, proxy, sid, target, ifrom=None, block=True, timeout=None, callback=None): + def activate(self, proxy, sid, target, ifrom=None, timeout=None, callback=None): """Activate the socks5 session that has been negotiated.""" iq = self.xmpp.Iq(sto=proxy, stype='set', sfrom=ifrom) iq['socks']['sid'] = sid iq['socks']['activate'] = target - iq.send(block=block, timeout=timeout, callback=callback) + iq.send(timeout=timeout, callback=callback) def deactivate(self, sid): """Closes the proxy socket associated with this SID.""" -- cgit v1.2.3