From 6cd32e4b74403f96c58e978ac2b3a3acf3d61a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Wed, 29 Jul 2009 20:17:41 +0000 Subject: [PATCH] Bug [0003123]: [Gedcom] An empty type on event may break import (gbritton) svn: r12853 --- src/GrampsDbUtils/_GedcomParse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GrampsDbUtils/_GedcomParse.py b/src/GrampsDbUtils/_GedcomParse.py index 0ea29f7cc..ccd4dc539 100644 --- a/src/GrampsDbUtils/_GedcomParse.py +++ b/src/GrampsDbUtils/_GedcomParse.py @@ -1166,7 +1166,7 @@ class GedcomParser(UpdateCallback): line.data.startswith("SOURCE "): # A source formatted in a single line, for example: # 0 @S62@ SOUR This is the title of the source - source = self.__find_or_create_source(self.sid_map[line[3]]) + source = self.__find_or_create_source(self.sid_map[line.data]) source.set_title(line.data[5:]) self.dbase.commit_source(source, self.trans) elif key[0:4] == "NOTE": @@ -2729,7 +2729,7 @@ class GedcomParser(UpdateCallback): else: try: name = gen.lib.EventType((gen.lib.EventType.CUSTOM, - line[3])) + line.data)) except AttributeError: name = gen.lib.EventType(gen.lib.EventType.UNKNOWN) state.event.set_type(name)