2007-10-12 Benny Malengier <benny.malengier@gramps-project.org>
* src/Filters/_FilterParser.py: avoid unknown filters crashing * src/Filters/Rules/Person/__init__.py: remove private filter list and register, not used. svn: r9154
This commit is contained in:
parent
054e251754
commit
95bd750cdb
@ -1,3 +1,7 @@
|
|||||||
|
2007-10-12 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
|
* 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 <benny.malengier@gramps-project.org>
|
2007-10-11 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
* src/gen/db/base.py: allow check without gid creation on all objects
|
* src/gen/db/base.py: allow check without gid creation on all objects
|
||||||
* src/GrampsDbUtils/_ReadXML.py: on reference read, don't create gid.
|
* src/GrampsDbUtils/_ReadXML.py: on reference read, don't create gid.
|
||||||
|
@ -95,8 +95,6 @@ from _RegExpName import RegExpName
|
|||||||
from _MatchIdOf import MatchIdOf
|
from _MatchIdOf import MatchIdOf
|
||||||
from _RegExpIdOf import RegExpIdOf
|
from _RegExpIdOf import RegExpIdOf
|
||||||
|
|
||||||
# This is the name->class storage for private rule classes
|
|
||||||
private = {}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -162,6 +160,3 @@ editor_rule_list = [
|
|||||||
Disconnected,
|
Disconnected,
|
||||||
]
|
]
|
||||||
|
|
||||||
def register(rule):
|
|
||||||
private[rule.__name__] = rule
|
|
||||||
editor_rule_list.append(rule)
|
|
||||||
|
@ -96,11 +96,6 @@ class FilterParser(handler.ContentHandler):
|
|||||||
exec 'self.r = Rules.%s.%s' % (
|
exec 'self.r = Rules.%s.%s' % (
|
||||||
self.namespace,last_name)
|
self.namespace,last_name)
|
||||||
except (ImportError, NameError, AttributeError ):
|
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 "\
|
print "ERROR: Filter rule '%s' in "\
|
||||||
"filter '%s' not found!"\
|
"filter '%s' not found!"\
|
||||||
% (save_name,self.f.get_name())
|
% (save_name,self.f.get_name())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user