From dccbafc3bbc4e5a28840c5338a9ce7ab045862b8 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 8 Aug 2001 01:22:59 +0000 Subject: [PATCH] Fix mrel and frel on read if only one is present svn: r312 --- gramps/src/GrampsParser.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gramps/src/GrampsParser.py b/gramps/src/GrampsParser.py index 03917f3f2..d1792c8f0 100644 --- a/gramps/src/GrampsParser.py +++ b/gramps/src/GrampsParser.py @@ -289,9 +289,15 @@ class GrampsParser(handler.ContentHandler): if attrs.has_key("type"): type = u2l(attrs["type"]) self.person.AltFamilyList.append((family,type,type)) - elif attrs.has_key("mrel"): - mrel = u2l(attrs["mrel"]) - frel = u2l(attrs["frel"]) + elif attrs.has_key("mrel") or attrs.has_key("frel"): + if attrs.has_key("mrel"): + mrel = u2l(attrs["mrel"]) + else: + mrel = "" + if attrs.has_key("frel"): + frel = u2l(attrs["frel"]) + else: + frel = "" if mrel=="Birth" and frel=="Birth": self.person.MainFamily = family else: