Implement iter_people_handles methods and begin to use them

svn: r12760
This commit is contained in:
Gerald Britton
2009-07-03 20:23:41 +00:00
parent 40d0605a63
commit f7454de7fd
44 changed files with 217 additions and 160 deletions

View File

@ -218,6 +218,16 @@ class PrivateProxyDb(ProxyDbBase):
handles.append(handle)
return handles
def iter_person_handles(self):
"""
Return an iterator over database handles, one handle for each Person in
the database. If sort_handles is True, the list is sorted by surnames
"""
for handle in self.db.iter_person_handles():
person = self.db.get_person_from_handle(handle)
if not person.get_privacy():
yield handle
def get_place_handles(self, sort_handles=True):
"""
Return a list of database handles, one handle for each Place in