* 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:
@@ -117,21 +117,21 @@ class PackageWriter:
|
||||
nl.remove(o)
|
||||
p.set_media_list(nl)
|
||||
for key in self.db.get_person_keys():
|
||||
p = self.db.find_person_from_id(key)
|
||||
p = self.db.try_to_find_person_from_id(key)
|
||||
nl = p.get_media_list()
|
||||
for o in nl:
|
||||
if o.get_reference() == mobj:
|
||||
nl.remove(o)
|
||||
p.set_media_list(nl)
|
||||
for key in self.db.get_source_keys():
|
||||
p = self.db.find_person_from_source(key)
|
||||
p = self.db.try_to_find_source_from_id(key)
|
||||
nl = p.get_media_list()
|
||||
for o in nl:
|
||||
if o.get_reference() == mobj:
|
||||
nl.remove(o)
|
||||
p.set_media_list(nl)
|
||||
for key in self.db.get_place_id_keys():
|
||||
p = self.db.find_place_from_id(key)
|
||||
p = self.db.try_to_find_place_from_id(key)
|
||||
nl = p.get_media_list()
|
||||
for o in nl:
|
||||
if o.get_reference() == mobj:
|
||||
@@ -170,7 +170,7 @@ class PackageWriter:
|
||||
# Write media files first, since the database may be modified
|
||||
# during the process (i.e. when removing object)
|
||||
for ObjectId in self.db.get_object_keys():
|
||||
oldfile = self.db.find_object_from_id(ObjectId).get_path()
|
||||
oldfile = self.db.try_to_find_object_from_id(ObjectId).get_path()
|
||||
base = os.path.basename(oldfile)
|
||||
if os.path.isfile(oldfile):
|
||||
g = open(oldfile,"rb")
|
||||
|
Reference in New Issue
Block a user