summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2022-02-04 23:11:28 +0100
committermathieui <mathieui@mathieui.net>2022-02-04 23:11:28 +0100
commit714f9aae0d90f9456542906b0ea14298f1a096bf (patch)
treee338218dd30f4896a3a6ed4ae14fdf04ce338859
parent9eb4462accb4367a2577cbf70e683731a552d27a (diff)
parent4d7786a83052b2242a7a33b961bfe36bfc63245e (diff)
downloadslixmpp-714f9aae0d90f9456542906b0ea14298f1a096bf.tar.gz
slixmpp-714f9aae0d90f9456542906b0ea14298f1a096bf.tar.bz2
slixmpp-714f9aae0d90f9456542906b0ea14298f1a096bf.tar.xz
slixmpp-714f9aae0d90f9456542906b0ea14298f1a096bf.zip
Merge branch 'bugfix/xep_0009' into 'master'
xep-0009: fixed bugs See merge request poezio/slixmpp!172
-rw-r--r--slixmpp/plugins/xep_0009/binding.py2
-rw-r--r--slixmpp/plugins/xep_0009/rpc.py12
2 files changed, 7 insertions, 7 deletions
diff --git a/slixmpp/plugins/xep_0009/binding.py b/slixmpp/plugins/xep_0009/binding.py
index ffec5431..4b64a010 100644
--- a/slixmpp/plugins/xep_0009/binding.py
+++ b/slixmpp/plugins/xep_0009/binding.py
@@ -22,7 +22,7 @@ def fault2xml(fault):
def xml2fault(params):
vals = []
- for value in params.xml.findall('{%s}value' % _namespace):
+ for value in params.findall('{%s}value' % _namespace):
vals.append(_xml2py(value))
fault = dict()
fault['code'] = vals[0]['faultCode']
diff --git a/slixmpp/plugins/xep_0009/rpc.py b/slixmpp/plugins/xep_0009/rpc.py
index 497303a4..b00432b0 100644
--- a/slixmpp/plugins/xep_0009/rpc.py
+++ b/slixmpp/plugins/xep_0009/rpc.py
@@ -53,8 +53,8 @@ class XEP_0009(BasePlugin):
def make_iq_method_call(self, pto, pmethod, params):
iq = self.xmpp.make_iq_set()
- iq.attrib['to'] = pto
- iq.attrib['from'] = self.xmpp.boundjid.full
+ iq['to'] = pto
+ iq['from'] = self.xmpp.boundjid.full
iq.enable('rpc_query')
iq['rpc_query']['method_call']['method_name'] = pmethod
iq['rpc_query']['method_call']['params'] = params
@@ -62,16 +62,16 @@ class XEP_0009(BasePlugin):
def make_iq_method_response(self, pid, pto, params):
iq = self.xmpp.make_iq_result(pid)
- iq.attrib['to'] = pto
- iq.attrib['from'] = self.xmpp.boundjid.full
+ iq['to'] = pto
+ iq['from'] = self.xmpp.boundjid.full
iq.enable('rpc_query')
iq['rpc_query']['method_response']['params'] = params
return iq
def make_iq_method_response_fault(self, pid, pto, params):
iq = self.xmpp.make_iq_result(pid)
- iq.attrib['to'] = pto
- iq.attrib['from'] = self.xmpp.boundjid.full
+ iq['to'] = pto
+ iq['from'] = self.xmpp.boundjid.full
iq.enable('rpc_query')
iq['rpc_query']['method_response']['params'] = None
iq['rpc_query']['method_response']['fault'] = params