* src/plugins/Leak.py (display): Catch exception coming from
trying to call __repr__ on a closed db.DB. svn: r5903
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2006-02-08 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/plugins/Leak.py (display): Catch exception coming from
|
||||||
|
trying to call __repr__ on a closed db.DB.
|
||||||
|
|
||||||
2006-01-26 Brian Matherly <pez4brian@users.sourceforge.net>
|
2006-01-26 Brian Matherly <pez4brian@users.sourceforge.net>
|
||||||
* src/plugins/FamilyGroup.py: correctly put borders on the
|
* src/plugins/FamilyGroup.py: correctly put borders on the
|
||||||
children cells.
|
children cells.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003-2005 Donald N. Allingham
|
# Copyright (C) 2003-2006 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -31,6 +31,7 @@ Show uncollected objects in a window.
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
from bsddb.db import DBError
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -114,10 +115,15 @@ class Leak(Tool.Tool):
|
|||||||
mylist = []
|
mylist = []
|
||||||
if len(gc.garbage):
|
if len(gc.garbage):
|
||||||
for each in gc.garbage:
|
for each in gc.garbage:
|
||||||
|
try:
|
||||||
mylist.append(str(each))
|
mylist.append(str(each))
|
||||||
self.ebuf.set_text(_("Uncollected objects:\n\n") + '\n\n'.join(mylist))
|
except DBError:
|
||||||
|
mylist.append('db.DB instance at %s' % id(each))
|
||||||
|
self.ebuf.set_text(_("Uncollected objects:\n\n")
|
||||||
|
+ '\n\n'.join(mylist))
|
||||||
else:
|
else:
|
||||||
self.ebuf.set_text(_("No uncollected objects\n") + str(gc.get_debug()))
|
self.ebuf.set_text(_("No uncollected objects\n")
|
||||||
|
+ str(gc.get_debug()))
|
||||||
|
|
||||||
def apply_clicked(self,obj):
|
def apply_clicked(self,obj):
|
||||||
self.display()
|
self.display()
|
||||||
|
Reference in New Issue
Block a user