Mercurial > libervia-backend
comparison src/tools/xml_tools.py @ 754:f021bf27a557
core (xml tools): bad default parameter in XMLUI.addList
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 24 Dec 2013 01:31:18 +0100 |
parents | 969562c4761b |
children | 93bd868b8fb6 |
comparison
equal
deleted
inserted
replaced
753:7f98f53f6997 | 754:f021bf27a557 |
---|---|
332 assert value in ["true", "false"] | 332 assert value in ["true", "false"] |
333 elem = self._createElem('bool', name, self.currentLayout) | 333 elem = self._createElem('bool', name, self.currentLayout) |
334 elem.setAttribute('value', value) | 334 elem.setAttribute('value', value) |
335 return elem | 335 return elem |
336 | 336 |
337 def addList(self, options, name=None, value=None, style=set()): | 337 def addList(self, options, name=None, value=None, style=None): |
338 """Add a list of choices""" | 338 """Add a list of choices""" |
339 if style is None: | |
340 style = set() | |
339 styles = set(style) | 341 styles = set(style) |
340 assert options | 342 assert options |
341 assert styles.issubset(['multi']) | 343 assert styles.issubset(['multi']) |
342 elem = self._createElem('list', name, self.currentLayout) | 344 elem = self._createElem('list', name, self.currentLayout) |
343 self.addOptions(options, elem) | 345 self.addOptions(options, elem) |