Allow newer filters to add items to older filters, and still work
svn: r16205
This commit is contained in:
parent
b7bebc856d
commit
2b5c8814bd
@ -28,6 +28,14 @@
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.ggettext import gettext as _
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# enable logging for error handling
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import logging
|
||||
log = logging.getLogger(".")
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Rule
|
||||
@ -88,10 +96,10 @@ class Rule(object):
|
||||
|
||||
def set_list(self, arg):
|
||||
assert isinstance(arg, list) or arg is None, "Argument is not a list"
|
||||
assert len(arg) == len(self.labels), \
|
||||
"ERROR: Number of arguments does not match number of labels.\n"\
|
||||
" list: %s\n"\
|
||||
" labels: %s" % (arg,self.labels)
|
||||
if len(arg) != len(self.labels):
|
||||
log.warning(("Number of arguments does not match number of labels.\n" +
|
||||
" list: %s\n" +
|
||||
" labels: %s") % (arg,self.labels))
|
||||
self.list = arg
|
||||
|
||||
def values(self):
|
||||
|
@ -569,7 +569,8 @@ class EditRule(ManagedWindow.ManagedWindow):
|
||||
(class_obj, vallist, tlist) = self.page[page]
|
||||
r = self.active_rule.values()
|
||||
for i in range(0, len(tlist)):
|
||||
tlist[i].set_text(r[i])
|
||||
if i < len(r):
|
||||
tlist[i].set_text(r[i])
|
||||
|
||||
self.selection.connect('changed', self.on_node_selected)
|
||||
self.rname.connect('button-press-event', self._button_press)
|
||||
|
Loading…
Reference in New Issue
Block a user