* src/plugins/ReadGedcom.py: Handle Legacy's method of

handling separations and divorces


svn: r2140
This commit is contained in:
Don Allingham 2003-09-18 02:59:52 +00:00
parent e99846cb13
commit c58c98bf54

View File

@ -1322,18 +1322,21 @@ class GedcomParser:
self.backup() self.backup()
break break
elif matches[1] == "TYPE": elif matches[1] == "TYPE":
if event.getName() != "": if event.getName() == "" or event.getName() == 'EVEN':
try: try:
event.setName(ged2fam[matches[2]]) event.setName(ged2fam[matches[2]])
except: except:
event.setName(matches[2]) event.setName(matches[2])
else:
note = 'Status = %s\n' % matches[2]
elif matches[1] == "DATE": elif matches[1] == "DATE":
event.setDateObj(self.extract_date(matches[2])) event.setDateObj(self.extract_date(matches[2]))
elif matches[1] == "CAUS": elif matches[1] == "CAUS":
info = matches[2] + self.parse_continue_data(level+1) info = matches[2] + self.parse_continue_data(level+1)
event.setCause(info) event.setCause(info)
self.parse_cause(event,level+1) self.parse_cause(event,level+1)
elif matches[1] in ["TIME","AGE","AGNC","ADDR","STAT","TEMP","HUSB","WIFE","OBJE","_CHUR"]: elif matches[1] in ["TIME","AGE","AGNC","ADDR","STAT",
"TEMP","HUSB","WIFE","OBJE","_CHUR"]:
self.ignore_sub_junk(level+1) self.ignore_sub_junk(level+1)
elif matches[1] == "SOUR": elif matches[1] == "SOUR":
event.addSourceRef(self.handle_source(matches,level+1)) event.addSourceRef(self.handle_source(matches,level+1))