summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0004
diff options
context:
space:
mode:
authorRobert Robinson <rerobins@gmail.com>2015-09-14 17:00:53 -0600
committerRobert Robinson <rerobins@gmail.com>2015-09-14 17:00:53 -0600
commit93c705fb3133b27388c0845f925b0615c88414b1 (patch)
tree143c6c4fd429710a0b4a29912cef0c7d2c769605 /sleekxmpp/plugins/xep_0004
parent0724f623bb613007f9acd6540efd4f256c8b6503 (diff)
downloadslixmpp-93c705fb3133b27388c0845f925b0615c88414b1.tar.gz
slixmpp-93c705fb3133b27388c0845f925b0615c88414b1.tar.bz2
slixmpp-93c705fb3133b27388c0845f925b0615c88414b1.tar.xz
slixmpp-93c705fb3133b27388c0845f925b0615c88414b1.zip
Fix xep_0050 changes after form refactor.
Diffstat (limited to 'sleekxmpp/plugins/xep_0004')
-rw-r--r--sleekxmpp/plugins/xep_0004/stanza/form.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/sleekxmpp/plugins/xep_0004/stanza/form.py b/sleekxmpp/plugins/xep_0004/stanza/form.py
index cca9d2e0..f55e88a9 100644
--- a/sleekxmpp/plugins/xep_0004/stanza/form.py
+++ b/sleekxmpp/plugins/xep_0004/stanza/form.py
@@ -22,8 +22,7 @@ class Form(ElementBase):
namespace = 'jabber:x:data'
name = 'x'
plugin_attrib = 'form'
- interfaces = set(('instructions', 'items',
- 'reported', 'title', 'type', ))
+ interfaces = set(('instructions', 'items', 'reported', 'title', 'type', ))
sub_interfaces = set(('title',))
form_types = set(('cancel', 'form', 'result', 'submit'))
@@ -43,7 +42,7 @@ class Form(ElementBase):
@property
def field(self):
- return self['fields']
+ return self.get_fields()
def set_type(self, ftype):
self._set_attr('type', ftype)
@@ -178,7 +177,7 @@ class Form(ElementBase):
def get_values(self):
values = OrderedDict()
- fields = self['fields']
+ fields = self.get_fields()
for var in fields:
values[var] = fields[var]['value']
return values
@@ -226,7 +225,7 @@ class Form(ElementBase):
self.add_reported(var, **field)
def set_values(self, values):
- fields = self['fields']
+ fields = self.get_fields()
for field in values:
if field not in self.get_fields():
fields[field] = self.add_field(var=field)