* src/GenericFilter.py (FilterParser.startElement): Catch non existing filter rule and print an error message

svn: r4325
This commit is contained in:
Martin Hawlisch 2005-04-08 18:52:05 +00:00
parent 5184d567fa
commit b33612a7a1
2 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,9 @@
* src/PeopleModel.py (column_death_place): Use "Burial" and "Cremation" events * src/PeopleModel.py (column_death_place): Use "Burial" and "Cremation" events
* src/GenericFilter.py (FilterParser.startElement): Catch non existing
filter rule and print an error message
2005-04-08 Richard Taylor <rjt-gramps@thegrindstone.me.uk> 2005-04-08 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/Utils.py (probably_alive): fix some bugs and added checking of ancestors. * src/Utils.py (probably_alive): fix some bugs and added checking of ancestors.

View File

@ -2336,7 +2336,10 @@ class FilterParser(handler.ContentHandler):
cname = attrs['class'] cname = attrs['class']
name = unicode(_(cname)) name = unicode(_(cname))
self.a = [] self.a = []
if name in tasks:
self.cname = tasks[name] self.cname = tasks[name]
else:
print "ERROR: Filter rule '%s' in filter '%s' not found!" % (name,self.f.get_name())
elif tag == "arg": elif tag == "arg":
self.a.append(attrs['value']) self.a.append(attrs['value'])