From e4a1d75f14cd47c1ecdc4aa8df1c28daf9c15550 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 30 Jun 2003 03:07:24 +0000 Subject: [PATCH] * src/DisplayTrace.py: identify more linux versions svn: r1803 --- src/DisplayTrace.py | 7 ++++++- src/gramps_main.py | 4 ++-- src/plugins/ReorderIds.py | 29 ++++++++++++++++------------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/DisplayTrace.py b/src/DisplayTrace.py index 760332961..ab7b06180 100644 --- a/src/DisplayTrace.py +++ b/src/DisplayTrace.py @@ -45,10 +45,14 @@ import const from intl import gettext as _ _release_files = [ - "/etc/redhat-release", "/etc/mandrake-release", + "/etc/redhat-release", + "/etc/turbolinux-release", + "/etc/debian-version", + "/etc/environment.corel", "/etc/debian-release", "/etc/SuSE-release", + "/etc/slackware-release", "/etc/gentoo-release", ] @@ -73,6 +77,7 @@ class DisplayTrace: msg.write("LANG : %s\n" % os.environ['LANG']) msg.write("Python : %s.%s.%s %s\n" % (ver[0],ver[1],ver[2],ver[3])) msg.write("GTK : %s.%s.%s\n" % gtk.gtk_version) + msg.write('PyGTK : %d.%d.%d\n' % gtk.pygtk_version) for n in _release_files: if os.path.isfile(n): try: diff --git a/src/gramps_main.py b/src/gramps_main.py index e3af8a4d1..312acf90d 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -811,9 +811,9 @@ class Gramps: def tool_callback(self,val): if val: - import_tool_callback() + self.import_tool_callback() - def import_tool_callback(self,val): + def import_tool_callback(self): Utils.modified() self.clear_person_tabs() self.full_update() diff --git a/src/plugins/ReorderIds.py b/src/plugins/ReorderIds.py index 37a55e883..dd3830230 100644 --- a/src/plugins/ReorderIds.py +++ b/src/plugins/ReorderIds.py @@ -75,20 +75,23 @@ class ReorderIds: # hasn't already been chosen. If it has, put this # in the duplicate id list - index = match.groups()[0] - newid = prefix % int(index) - if newid == id: - continue - elif data_map.has_key(newid): + try: + index = match.groups()[0] + newid = prefix % int(index) + if newid == id: + continue + elif data_map.has_key(newid): + dups.append(id) + else: + newids.append(id) + data = data_map[id] + data.setId(newid) + data_map[newid] = data + del data_map[id] + if update: + update(newid,id) + except: dups.append(id) - else: - newids.append(id) - data = data_map[id] - data.setId(newid) - data_map[newid] = data - del data_map[id] - if update: - update(newid,id) else: dups.append(id)