# HG changeset patch # User Goffi # Date 1280317921 -28800 # Node ID 7c00c4b0a5c2d7c84148654b2bbf7449c088263e # Parent c8b231abfe96ccf05fffe7990782de92c73f2214 xml_tools: removed unused content parameter in addElement diff -r c8b231abfe96 -r 7c00c4b0a5c2 tools/xml_tools.py --- a/tools/xml_tools.py Wed Jul 28 19:51:17 2010 +0800 +++ b/tools/xml_tools.py Wed Jul 28 19:52:01 2010 +0800 @@ -55,7 +55,7 @@ else: form_ui.addEmpty() - elem = form_ui.addElement(__field_type, field.var, None, field.value, [option.value for option in field.options]) + elem = form_ui.addElement(__field_type, field.var, field.value, [option.value for option in field.options]) return form_ui.toXml() def tupleList2dataForm(values): @@ -233,15 +233,16 @@ - def addElement(self, type, name = None, content = None, value = None, options = None, callback_id = None): + def addElement(self, type, name = None, value = None, options = None, callback_id = None): """Convenience method to add element, the params correspond to the ones in addSomething methods""" if type == 'empty': self.addEmpty(name) elif type == 'text': - assert(content) - self.addText(content, name) + assert(value!=None) + self.addText(value, name) elif type == 'label': assert(value) + self.addLabel(value) elif type == 'string': self.addString(name, value) elif type == 'password':