Replace get_family_handles with iter_family_handles

svn: r12776
This commit is contained in:
Gerald Britton
2009-07-08 16:11:20 +00:00
parent f680992d04
commit b601f4bdf2
21 changed files with 53 additions and 29 deletions

View File

@ -284,12 +284,22 @@ class PrivateProxyDb(ProxyDbBase):
the database.
"""
handles = []
for handle in self.db.get_family_handles():
for handle in self.db.iter_family_handles():
family = self.db.get_family_from_handle(handle)
if not family.get_privacy():
handles.append(handle)
return handles
def iter_family_handles(self):
"""
Return an iterator over database handles, one handle for each Family in
the database.
"""
for handle in self.db.iter_family_handles():
family = self.db.get_family_from_handle(handle)
if not family.get_privacy():
yield handle
def get_repository_handles(self):
"""
Return a list of database handles, one handle for each Repository in