From e9cf818b7c88efd9132ddc900fbb99fe925df761 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 31 Jul 2006 00:38:31 +0000 Subject: [PATCH] * src/GrampsDb/_ReadGedcom.py: handle missing event type svn: r7098 --- ChangeLog | 1 + src/GrampsDb/_ReadGedcom.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2c415f5f..f7362c6d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2006-07-30 Don Allingham + * src/GrampsDb/_ReadGedcom.py: handle missing event type * src/DataViews/_PlaceView.py: add tooltip for map button 2006-07-30 Alex Roitman diff --git a/src/GrampsDb/_ReadGedcom.py b/src/GrampsDb/_ReadGedcom.py index 8bd1906d2..c090e0320 100644 --- a/src/GrampsDb/_ReadGedcom.py +++ b/src/GrampsDb/_ReadGedcom.py @@ -1813,11 +1813,14 @@ class GedcomParser(UpdateCallback): name = RelLib.EventType((RelLib.EventType.CUSTOM,matches[3])) event.set_type(name) else: - if not ged2gramps.has_key(matches[2]) and \ - not ged2fam.has_key(matches[2]) and \ - matches[2][0] != 'Y': - event.set_description(matches[2]) - + try: + if not ged2gramps.has_key(matches[2]) and \ + not ged2fam.has_key(matches[2]) and \ + matches[2][0] != 'Y': + event.set_description(matches[2]) + except IndexError: + pass + def func_event_privacy(self, matches, event, level): event.set_privacy(True)