* src/RelLib.py (try_to_find_person_from_id): Remove transaction;

(try_to_find_source_from_id, try_to_find_object_from_id,
try_to_find_place_from_id): Add functions.
* src/plugins/WriteCD.py, src/plugins/WritePkg.py,
src/plugins/WebPage.py, src/plugins/Verify.py,
src/plugins/TimeLine.py, src/plugins/Summary.py,
src/plugins/SoundGen.py, src/plugins/RelGraph.py,
src/plugins/RelCalc.py, src/plugins/PatchNames.py,
src/plugins/Merge.py, src/plugins/IndivSummary.py,
src/plugins/IndivComplete.py, src/plugins/GraphViz.py,
src/plugins/FtmStyleDescendants.py,
src/plugins/FtmStyleAncestors.py, src/plugins/FilterEditor.py,
src/plugins/FanChart.py, src/plugins/FamilyGroup.py,
src/plugins/EventCmp.py, src/plugins/DetDescendantReport.py,
src/plugins/DetAncestralReport.py, src/plugins/DescendReport.py,
src/plugins/Desbrowser.py, src/plugins/CountAncestors.py,
src/plugins/Check.py, src/plugins/ChangeTypes.py,
src/plugins/BookReport.py, src/plugins/Ancestors.py,
src/plugins/AncestorReport.py, src/plugins/AncestorChart.py,
src/plugins/AncestorChart2.py, src/Relationship.py,
src/Sort.py, src/GenericFilter.py, src/SubstKeywords.py,
src/GraphLayout.py: Switch from find_* to try_to_find_* methods.


svn: r3191
This commit is contained in:
Alex Roitman
2004-05-26 02:05:02 +00:00
parent 60a6973bbf
commit 8ddbce94f0
39 changed files with 377 additions and 315 deletions

View File

@@ -147,7 +147,7 @@ class Verify:
warn = cStringIO.StringIO()
for person_id in personList:
person = self.db.find_person_from_id(person_id)
person = self.db.try_to_find_person_from_id(person_id)
idstr = "%s (%s)" % (person.get_primary_name().get_name(),person_id)
# individual checks
@@ -278,9 +278,9 @@ class Verify:
mother_id = family.get_mother_id()
father_id = family.get_father_id()
if mother_id:
mother = self.db.find_person_from_id(mother_id)
mother = self.db.try_to_find_person_from_id(mother_id)
if father_id:
father = self.db.find_person_from_id(father_id)
father = self.db.try_to_find_person_from_id(father_id)
if mother_id and father_id:
if ( mother.get_gender() == father.get_gender() ) and mother.get_gender() != RelLib.Person.unknown:
warn.write( _("Homosexual marriage: %s in family %s.\n") % ( idstr, family.get_id() ) )
@@ -293,7 +293,7 @@ class Verify:
else:
spouse_id = father_id
if spouse_id:
spouse = self.db.find_person_from_id(spouse_id)
spouse = self.db.try_to_find_person_from_id(spouse_id)
if person.get_gender() == RelLib.Person.male and \
person.get_primary_name().get_surname() == spouse.get_primary_name().get_surname():
warn.write( _("Husband and wife with the same surname: %s in family %s, and %s.\n") % (
@@ -323,7 +323,7 @@ class Verify:
for child_id in family.get_child_id_list():
cnum = cnum + 1
if maryear == 0:
child = self.db.find_person_from_id(child_id)
child = self.db.try_to_find_person_from_id(child_id)
birthyear = self.get_year( child.get_birth_id() )
if birthyear > 0:
maryear = birthyear-cnum
@@ -391,7 +391,7 @@ class Verify:
cbyears = []
for child_id in family.get_child_id_list():
nkids = nkids+1
child = self.db.find_person_from_id(child_id)
child = self.db.try_to_find_person_from_id(child_id)
cbyear = self.get_year( child.get_birth_id() )
if cbyear:
cbyears.append(cbyear)