* src/GrampsDb/_ReadGedcom.py: fix event handling, fix skip_record

svn: r5821
This commit is contained in:
Don Allingham 2006-01-23 01:55:29 +00:00
parent 9e83727f09
commit b204a3bc70
2 changed files with 11 additions and 5 deletions

View File

@ -2,7 +2,7 @@
* src/Makefile.am: remove PeopleView.py
* src/PeopleView.py: removed, replaced by PersonView
* src/PersonView.py: set ellipsize property
* src/GrampsDb/_ReadGedcom.py: fix event handling
* src/GrampsDb/_ReadGedcom.py: fix event handling, fix skip_record
2006-01-21 Don Allingham <don@gramps-project.org>
* src/PeopleModel.py: fix sorting of subnames

View File

@ -1517,9 +1517,9 @@ class GedcomParser:
etype = event.get_type()
if etype[0] == RelLib.Event.CUSTOM:
try:
event.set_name((ged2fam[matches[2]],''))
event.set_type((ged2fam[matches[2]],''))
except:
event.set_name((RelLib.Event.CUSTOM,matches[2]))
event.set_type((RelLib.Event.CUSTOM,matches[2]))
else:
note = 'Status = %s\n' % matches[2]
elif matches[1] == TOKEN_DATE:
@ -2127,7 +2127,13 @@ class GedcomParser:
def func_person_attr(self,matches,state):
attr = RelLib.Attribute()
attr.set_type(matches[1])
n = matches[3]
atype = self.gedattr.get(n,RelLib.Attribute.CUSTOM)
if atype == RelLib.Attribute.CUSTOM:
attr.set_type((atype,n))
else:
attr.set_type((atype,''))
attr.set_value(matches[2])
state.person.add_attribute(attr)
@ -2245,7 +2251,7 @@ class GedcomParser:
sref = self.handle_source(matches,state.level+1)
state.name.add_source_reference(sref)
def skip_record(self,matches):
def skip_record(self,matches,state):
self.ignore_sub_junk(2)
#-------------------------------------------------------------------------