From f50f7cecd7d1cd3cb554b7288e6a339a50b41a46 Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Fri, 1 Jul 2011 11:45:43 +0000 Subject: [PATCH] 5059: Reordering Gramps IDs fails svn: r17887 --- src/plugins/tool/ReorderIds.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/tool/ReorderIds.py b/src/plugins/tool/ReorderIds.py index 5a779503b..664467241 100644 --- a/src/plugins/tool/ReorderIds.py +++ b/src/plugins/tool/ReorderIds.py @@ -180,13 +180,13 @@ class ReorderIds(tool.BatchTool): # attempt to extract integer, if we can't, treat it as a # duplicate - match = _findint.match(gramps_id) - if match: - # get the integer, build the new handle. Make sure it - # hasn't already been chosen. If it has, put this - # in the duplicate handle list + try: + match = _findint.match(gramps_id) + if match: + # get the integer, build the new handle. Make sure it + # hasn't already been chosen. If it has, put this + # in the duplicate handle list - try: index = match.groups()[0] if formatmatch: @@ -209,9 +209,9 @@ class ReorderIds(tool.BatchTool): obj.set_gramps_id(newgramps_id) commit(obj, self.trans) newids[newgramps_id] = gramps_id - except: + else: dups.append(handle) - else: + except: dups.append(handle) # go through the duplicates, looking for the first available