summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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