* src/GrampsDb/_ReadGedcom.py: handle missing event type

svn: r7098
This commit is contained in:
Don Allingham 2006-07-31 00:38:31 +00:00
parent 434aabe12f
commit 54ffac988b
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,5 @@
2006-07-30 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: handle missing event type
* src/DataViews/_PlaceView.py: add tooltip for map button
2006-07-30 Alex Roitman <shura@gramps-project.org>

View File

@ -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)