2007-02-27 Don Allingham <don@gramps-project.org>

* src/GrampsDbUtils/_GedcomParse.py (GedcomParser.parse_fam): use
	parse_level



svn: r8255
This commit is contained in:
Don Allingham 2007-02-27 16:45:40 +00:00
parent d7d7ed340b
commit 0a75738eb5
2 changed files with 6 additions and 11 deletions

View File

@ -1,3 +1,7 @@
2007-02-27 Don Allingham <don@gramps-project.org>
* src/GrampsDbUtils/_GedcomParse.py (GedcomParser.parse_fam): use
parse_level
2007-02-26 Brian Matherly <brian@gramps-project.org> 2007-02-26 Brian Matherly <brian@gramps-project.org>
* src/BaseDoc.py: * src/BaseDoc.py:
* src/docgen/PSDrawDoc.py: * src/docgen/PSDrawDoc.py:

View File

@ -1034,7 +1034,6 @@ class GedcomParser(UpdateCallback):
msg = _("Line %d was not understood, so it was ignored.") % text msg = _("Line %d was not understood, so it was ignored.") % text
self.warn(msg) self.warn(msg)
self.error_count += 1 self.error_count += 1
sys.exit(1)
self.skip_subordinate_levels(level) self.skip_subordinate_levels(level)
def warn(self, msg): def warn(self, msg):
@ -2353,18 +2352,10 @@ class GedcomParser(UpdateCallback):
# parse the family # parse the family
state = GedcomUtils.CurrentState() state = GedcomUtils.CurrentState(level=1)
state.level = 1
state.family = family state.family = family
while True: self.parse_level(state, self.family_func, self.func_family_even)
line = self.get_next()
if self.level_is_finished(line, 1):
break
if line.token not in (TOKEN_ENDL, TOKEN_BAPL, TOKEN_CONL):
func = self.family_func.get(line.token, self.func_family_even)
func(line, state)
# handle addresses attached to families # handle addresses attached to families
if state.addr != None: if state.addr != None: