From 31512878f15e64b0286fd9b627ef0c4c67a2a4aa Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 18 Jan 2009 14:12:21 +0000 Subject: [PATCH] Added a summary count, and line numbers to output to help compare details svn: r11655 --- src/plugins/tool/Leak.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/tool/Leak.py b/src/plugins/tool/Leak.py index b2b7f9a45..9a488bdbb 100644 --- a/src/plugins/tool/Leak.py +++ b/src/plugins/tool/Leak.py @@ -92,8 +92,11 @@ class Leak(Tool.Tool,ManagedWindow.ManagedWindow): mylist.append(str(each)) except DBError: mylist.append('db.DB instance at %s' % id(each)) - self.ebuf.set_text(_("Uncollected objects:\n\n") - + '\n\n'.join(mylist)) + self.ebuf.set_text(_("%d uncollected objects:\n\n" % len(mylist))) + count = 1 + for line in mylist: + self.ebuf.insert_at_cursor(" %d) %s\n" % (count, line)) + count += 1 else: self.ebuf.set_text(_("No uncollected objects\n") + str(gc.get_debug()))