diff --git a/ChangeLog b/ChangeLog index 325a45a1d..ba7a32d3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-12 Benny Malengier + * src/Filters/_FilterParser.py: avoid unknown filters crashing + * src/Filters/Rules/Person/__init__.py: remove private filter list and register, not used. + 2007-10-11 Benny Malengier * src/GrampsDb/_GrampsDbBase.py: allow check without gid creation on all objects * src/GrampsDb/_ReadXML.py: on reference read, don't create gid. diff --git a/src/Filters/Rules/Person/__init__.py b/src/Filters/Rules/Person/__init__.py index 79ee52950..029ca39f5 100644 --- a/src/Filters/Rules/Person/__init__.py +++ b/src/Filters/Rules/Person/__init__.py @@ -95,8 +95,6 @@ from _RegExpName import RegExpName from _MatchIdOf import MatchIdOf from _RegExpIdOf import RegExpIdOf -# This is the name->class storage for private rule classes -private = {} #------------------------------------------------------------------------- # @@ -162,6 +160,3 @@ editor_rule_list = [ Disconnected, ] -def register(rule): - private[rule.__name__] = rule - editor_rule_list.append(rule) diff --git a/src/Filters/_FilterParser.py b/src/Filters/_FilterParser.py index c452cab1b..bee4c4dd2 100644 --- a/src/Filters/_FilterParser.py +++ b/src/Filters/_FilterParser.py @@ -96,16 +96,11 @@ class FilterParser(handler.ContentHandler): exec 'self.r = Rules.%s.%s' % ( self.namespace,last_name) except (ImportError, NameError, AttributeError ): - # Now try the private rule - try: - exec "self.r = Rules.%s.private['%s']" % ( - self.namespace,last_name) - except KeyError: - print "ERROR: Filter rule '%s' in "\ - "filter '%s' not found!"\ + print "ERROR: Filter rule '%s' in "\ + "filter '%s' not found!"\ % (save_name,self.f.get_name()) - self.r = None - return + self.r = None + return self.a = [] elif tag == "arg": self.a.append(attrs['value'])