diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-04-07 23:10:32 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-04-07 23:10:32 -0700 |
commit | ecd5a172ed49cbdf69cb3eaf0786fd18d801ee65 (patch) | |
tree | d41aebdee8c6e6ed58850c7de006e00e405b9ddb /sleekxmpp/plugins/xep_0060.py | |
parent | 935ee4d14e80899fa45bb3d9296e123f642cc413 (diff) | |
download | slixmpp-ecd5a172ed49cbdf69cb3eaf0786fd18d801ee65.tar.gz slixmpp-ecd5a172ed49cbdf69cb3eaf0786fd18d801ee65.tar.bz2 slixmpp-ecd5a172ed49cbdf69cb3eaf0786fd18d801ee65.tar.xz slixmpp-ecd5a172ed49cbdf69cb3eaf0786fd18d801ee65.zip |
replaced usage of deprecated iq result on send. Fixed old send result to use stanzas instead of ElementTree
Diffstat (limited to 'sleekxmpp/plugins/xep_0060.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0060.py | 22 |
1 files changed, 11 insertions, 11 deletions
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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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("<iq id='%s'/>" % id, self.handlerCreateNodeResponse) - result = self.xmpp.send(iq, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % 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, "<iq id='%s'/>" % id) + result = iq.send() if result is None or result is False or result['type'] == 'error': return False return True |