From 54ffac988b6645c10443186917fdee0c7a172cb1 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 --- gramps2/ChangeLog | 1 + gramps2/src/GrampsDb/_ReadGedcom.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a2c415f5f..f7362c6d9 100644 --- a/gramps2/ChangeLog +++ b/gramps2/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/gramps2/src/GrampsDb/_ReadGedcom.py b/gramps2/src/GrampsDb/_ReadGedcom.py index 8bd1906d2..c090e0320 100644 --- a/gramps2/src/GrampsDb/_ReadGedcom.py +++ b/gramps2/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)