Replace filter with any for performace gain

svn: r10847
This commit is contained in:
Gerald Britton
2008-07-07 19:50:35 +00:00
parent 3cc07e26dd
commit 4afaea5c72
3 changed files with 3 additions and 4 deletions

View File

@@ -188,8 +188,7 @@ class SourceView(PageView.ListView):
source = db.get_source_from_handle(source_handle)
ans = DelSrcQuery(self.dbstate,self.uistate,source,the_lists)
if filter(None, the_lists): # quick test for non-emptiness
if any(the_lists): # quick test for non-emptiness
msg = _('This source is currently being used. Deleting it '
'will remove it from the database and from all '
'people and families that reference it.')