From ecd5a172ed49cbdf69cb3eaf0786fd18d801ee65 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Wed, 7 Apr 2010 23:10:32 -0700 Subject: replaced usage of deprecated iq result on send. Fixed old send result to use stanzas instead of ElementTree --- sleekxmpp/plugins/xep_0060.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sleekxmpp/plugins/xep_0060.py') diff --git a/sleekxmpp/plugins/xep_0060.py b/sleekxmpp/plugins/xep_0060.py index cbc89df6..8c6acd01 100644 --- a/sleekxmpp/plugins/xep_0060.py +++ b/sleekxmpp/plugins/xep_0060.py @@ -44,7 +44,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is False or result is None or result['type'] == 'error': return False return True @@ -64,7 +64,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is False or result is None or result['type'] == 'error': return False return True @@ -84,7 +84,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is False or result is None or result['type'] == 'error': return False return True @@ -103,7 +103,7 @@ class xep_0060(base.base_plugin): iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] #self.xmpp.add_handler("" % id, self.handlerCreateNodeResponse) - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result == False or result['type'] == 'error': logging.warning("got error instead of config") return False @@ -126,7 +126,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result == False or result['type'] == 'error': logging.warning("got error instead of config") return False @@ -149,7 +149,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result == False or result['type'] == 'error': logging.warning("got error instead of config") return False @@ -172,7 +172,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is not None and result is not False and result.attrib.get('type', 'error') != 'error': return True else: @@ -190,7 +190,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result['type'] == 'error': return False return True @@ -211,7 +211,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result is False or result['type'] == 'error': return False return True @@ -227,7 +227,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result is False or result['type'] == 'error': return False return True @@ -281,7 +281,7 @@ class xep_0060(base.base_plugin): iq.attrib['to'] = ps_jid iq.attrib['from'] = self.xmpp.fulljid id = iq['id'] - result = self.xmpp.send(iq, "" % id) + result = iq.send() if result is None or result is False or result['type'] == 'error': return False return True -- cgit v1.2.3