summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0004.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-10-29 02:34:23 +0000
committerNathan Fritz <fritzy@netflint.net>2009-10-29 02:34:23 +0000
commit44aa52663579bcd1a56d2f13cdc91b1ca2c2b542 (patch)
tree9466bb338e3fe20fb259a8cf3187dbf3e68488aa /sleekxmpp/plugins/xep_0004.py
parent8dbf53594bc9ea0aec1ecd81092d806d001a7b6c (diff)
downloadslixmpp-44aa52663579bcd1a56d2f13cdc91b1ca2c2b542.tar.gz
slixmpp-44aa52663579bcd1a56d2f13cdc91b1ca2c2b542.tar.bz2
slixmpp-44aa52663579bcd1a56d2f13cdc91b1ca2c2b542.tar.xz
slixmpp-44aa52663579bcd1a56d2f13cdc91b1ca2c2b542.zip
* fixed bugs with XEP 50 for components
* configuration-less nodes
Diffstat (limited to 'sleekxmpp/plugins/xep_0004.py')
-rw-r--r--sleekxmpp/plugins/xep_0004.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py
index faee631c..abd5ceef 100644
--- a/sleekxmpp/plugins/xep_0004.py
+++ b/sleekxmpp/plugins/xep_0004.py
@@ -108,6 +108,11 @@ class Form(FieldContainer):
form1.fields[field.var].addOption(option, label)
return form1
+ def copy(self):
+ newform = Form(ftype=self.type)
+ newform.fromXML(self.getXML(self.type))
+ return newform
+
def update(self, form):
values = form.getValues()
for var in values:
@@ -126,7 +131,7 @@ class Form(FieldContainer):
def setValues(self, values={}):
for field in values:
if field in self.field:
- if isintance(values[field], list) or isinstance(values[field], tuple):
+ if isinstance(values[field], list) or isinstance(values[field], tuple):
for value in values[field]:
self.field[field].setValue(value)
else: