From 5fe0a4df46bd055a91abfd5887ead6c8bb642b44 Mon Sep 17 00:00:00 2001 From: prculley Date: Mon, 20 Feb 2017 16:13:10 -0600 Subject: [PATCH 1/2] bug 9954; fix Gedcom import for empty FAMC line --- gramps/plugins/lib/libgedcom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index 4c4af2451..4c05eee1e 100644 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -4555,6 +4555,9 @@ class GedcomParser(UpdateCallback): @type state: CurrentState """ + if not line.data: # handles empty FAMC line + self.__not_recognized(line, state) + return sub_state = CurrentState() sub_state.person = state.person sub_state.level = state.level + 1 From 4226bc9d4500b4611178adf0426b8686486a4267 Mon Sep 17 00:00:00 2001 From: prculley Date: Tue, 21 Feb 2017 09:13:16 -0600 Subject: [PATCH 2/2] Fix Gedcom import for improper creation of error message note The improper note could overwrite another note, due to overlapping GIDs. --- gramps/plugins/lib/libgedcom.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py index 4c05eee1e..6f5d5d798 100644 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -3058,6 +3058,8 @@ class GedcomParser(UpdateCallback): text = StyledText(message, [tag]) new_note.set_styledtext(text) new_note.set_handle(create_id()) + gramps_id = self.nid_map[""] + new_note.set_gramps_id(gramps_id) note_type = NoteType() note_type.set((NoteType.CUSTOM, _("GEDCOM import"))) new_note.set_type(note_type)