* src/GenericFilter.py: Only load rules that provide the required number of arguments.

svn: r4941
This commit is contained in:
Martin Hawlisch 2005-07-15 17:02:40 +00:00
parent 16858c1f4a
commit dfcc7e0efb
2 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,8 @@
Show all names of a person; Show all images of person/source and place
* src/Utils.py (find_mime_type_pixbuf): Dont segfault with note only object
* src/SelectObject.py (on_select_row): Dont segfault with note only object
* src/GenericFilter.py: Only load rules that provide the required
number of arguments.
2005-07-14 Don Allingham <don@gramps-project.org>
* src/plugins/NavWebPage.py: gallery/media object enhancements, div/span fixes

View File

@ -2268,6 +2268,10 @@ class FilterParser(handler.ContentHandler):
def endElement(self,tag):
if tag == "rule" and self.r != None:
if len(self.r.labels) != len(self.a):
print "ERROR: Invalid number of arguments in filter '%s'!" %\
self.f.get_name()
else:
rule = self.r(self.a)
self.f.add_rule(rule)