2007-07-30 Don Allingham <don@gramps-project.org>

* src/GrampsDbUtils/_GedcomParse.py: assign inline note to the referencing object
	* src/GrampsDbUtils/_GedcomLex.py: fix UNKNOWN gender



svn: r8792
This commit is contained in:
Don Allingham
2007-07-31 03:28:04 +00:00
parent d5db42202a
commit 47cbc6f5d8
4 changed files with 10 additions and 2 deletions

View File

@@ -169,7 +169,10 @@ class GedLine:
"""
Converts the data field to a RelLib token indicating the gender
"""
self.data = SEX_MAP.get(self.data.strip(), RelLib.Person.UNKNOWN)
try:
self.data = SEX_MAP.get(self.data.strip()[0], RelLib.Person.UNKNOWN)
except:
self.data = RelLib.Person.UNKNOWN
def calc_date(self):
"""

View File

@@ -4274,6 +4274,7 @@ class GedcomParser(UpdateCallback):
new_note.set_handle(Utils.create_id())
self.dbase.add_note(new_note, self.trans)
self.__skip_subordinate_levels(level+1)
obj.add_note(new_note.get_handle())
def __parse_inline_note(self, line, level):
new_note = RelLib.Note(line.data)