From 7e3415accb581610d2d81edd5bdd0061c717e300 Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Sat, 11 Feb 2012 18:16:18 +0000 Subject: [PATCH] 0005030: Remove warning of libgedcom.py from family tree builder. Handle RIN and _UID on events. svn: r18861 --- src/plugins/lib/libgedcom.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index 246e125f5..4e5055b1d 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -2028,6 +2028,9 @@ class GedcomParser(UpdateCallback): # Not legal, but inserted by Ultimate Family Tree TOKEN_CHAN : self.__ignore, TOKEN_QUAY : self.__ignore, + # Not legal, but inserted by FamilyTreeBuilder + TOKEN_RIN : self.__event_rin, + TOKEN_ATTR : self.__event_attr, # _UID } self.adopt_parse_tbl = { @@ -4888,6 +4891,27 @@ class GedcomParser(UpdateCallback): """ state.event.add_citation(self.handle_source(line, state.level, state)) + def __event_rin(self, line, state): + """ + @param line: The current line in GedLine format + @type line: GedLine + @param state: The current state + @type state: CurrentState + """ + attr = gen.lib.Attribute() + attr.set_type(line.token_text) + attr.set_value(line.data) + state.event.add_attribute(attr) + + def __event_attr(self, line, state): + """ + @param line: The current line in GedLine format + @type line: GedLine + @param state: The current state + @type state: CurrentState + """ + state.event.add_attribute(line.data) + def __event_cause(self, line, state): """ @param line: The current line in GedLine format