5059: Reordering Gramps IDs fails

svn: r17887
This commit is contained in:
Michiel Nauta 2011-07-01 11:45:43 +00:00
parent 5cd666ca53
commit f50f7cecd7

View File

@ -180,13 +180,13 @@ class ReorderIds(tool.BatchTool):
# attempt to extract integer, if we can't, treat it as a # attempt to extract integer, if we can't, treat it as a
# duplicate # duplicate
try:
match = _findint.match(gramps_id) match = _findint.match(gramps_id)
if match: if match:
# get the integer, build the new handle. Make sure it # get the integer, build the new handle. Make sure it
# hasn't already been chosen. If it has, put this # hasn't already been chosen. If it has, put this
# in the duplicate handle list # in the duplicate handle list
try:
index = match.groups()[0] index = match.groups()[0]
if formatmatch: if formatmatch:
@ -209,10 +209,10 @@ class ReorderIds(tool.BatchTool):
obj.set_gramps_id(newgramps_id) obj.set_gramps_id(newgramps_id)
commit(obj, self.trans) commit(obj, self.trans)
newids[newgramps_id] = gramps_id newids[newgramps_id] = gramps_id
except:
dups.append(handle)
else: else:
dups.append(handle) dups.append(handle)
except:
dups.append(handle)
# go through the duplicates, looking for the first available # go through the duplicates, looking for the first available
# handle that matches the new scheme. # handle that matches the new scheme.