From fa6e44507ce81b3a44d9c006967ff122e54b43d6 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 13 Feb 2014 18:50:49 +0100 Subject: [PATCH] core(XMLUI): empty options in ListWidget now just show a warning message, no more assert --- src/tools/xml_tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/xml_tools.py b/src/tools/xml_tools.py index cc436f99..5b5059ba 100644 --- a/src/tools/xml_tools.py +++ b/src/tools/xml_tools.py @@ -608,7 +608,8 @@ class ListWidget(InputWidget): if style is None: style = set() styles = set(style) - assert options + if not options: + warning(_('empty "options" list')) if not styles.issubset(['multi']): raise exceptions.DataError(_("invalid styles")) super(ListWidget, self).__init__(xmlui, name, parent)