From 1366d3abc6d0710e9c64e6d96c1244d86d14c082 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 18 Jul 2012 05:45:47 +0000 Subject: [PATCH] 5708: Confusing results with statistic gramplet and filter svn: r20026 --- src/plugins/gramplet/StatsGramplet.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/gramplet/StatsGramplet.py b/src/plugins/gramplet/StatsGramplet.py index d40a8a4bf..cdd30239d 100644 --- a/src/plugins/gramplet/StatsGramplet.py +++ b/src/plugins/gramplet/StatsGramplet.py @@ -46,7 +46,7 @@ _YIELD_INTERVAL = 200 #------------------------------------------------------------------------ # -# Gramplet class +# StatsGramplet class # #------------------------------------------------------------------------ class StatsGramplet(Gramplet): @@ -103,12 +103,16 @@ class StatsGramplet(Gramplet): with_media += 1 total_media += length - names = [person.get_primary_name()] + person.get_alternate_names() - for name in names: - if (name.get_first_name() or name.get_group_name()) == "": + for name in [person.get_primary_name()] + person.get_alternate_names(): + if name.get_first_name().strip() == "": incomp_names += 1 - if name.get_group_name() not in namelist: - namelist.append(name.get_group_name()) + else: + if name.get_surname_list(): + for surname in name.get_surname_list(): + if surname.get_surname().strip() == "": + incomp_names += 1 + else: + incomp_names += 1 if (not person.get_main_parents_family_handle() and not len(person.get_family_handle_list())): @@ -193,3 +197,4 @@ class StatsGramplet(Gramplet): 'Filter', 'missing media') self.append_text(" %s\n" % len(notfound)) self.append_text("", scroll_to="begin") +