From 693879e0048d1cb23676d7d8c1e6013ef5f79954 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 21 Sep 2005 19:09:26 +0000 Subject: [PATCH] * src/ChooseParents.py: fix unbound variable when neither parents exist. svn: r5213 --- gramps2/ChangeLog | 2 ++ gramps2/src/ChooseParents.py | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index fa6074364..fd3d7c0f3 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2005-09-21 Don Allingham + * src/ChooseParents.py: fix unbound variable when neither parents + exist. * src/plugins/DetAncestralReport.py: fix endnotes for null sources * src/plugins/DetDescendantReport.py: fix endnotes for null sources * src/plugins/FtmStyleAncestors.py: fix endnotes for null sources diff --git a/gramps2/src/ChooseParents.py b/gramps2/src/ChooseParents.py index 9a9f636e1..2616c14ec 100644 --- a/gramps2/src/ChooseParents.py +++ b/gramps2/src/ChooseParents.py @@ -525,25 +525,23 @@ class ChooseParents: father_rel = RelLib.Person.CHILD_REL_BIRTH trans = self.db.transaction_begin() + father_handle = None + mother_handle = None if self.father or self.mother: if self.mother and not self.father: if self.mother.get_gender() == RelLib.Person.MALE: self.father = self.mother father_handle = self.father.get_handle() self.mother = None - mother_handle = None else: mother_handle = self.mother.get_handle() - father_handle = None elif self.father and not self.mother: if self.father.get_gender() == RelLib.Person.FEMALE: self.mother = self.father self.father = None mother_handle = self.mother.get_handle() - father_handle = None else: father_handle = self.father.get_handle() - mother_handle = None elif self.mother.get_gender() != self.father.get_gender(): if self.type == "Partners": self.type = "Unknown"