Replace get_family_handles with iter_family_handles
svn: r12776
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user