Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
use shorter list-comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Dec 3, 2012
1 parent dcbc322 commit f16f86b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Products/ZCTextIndex/ZCTextIndex.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ def index_object(self, documentId, obj, threshold=None):
all_texts.append(text)

# Check that we're sending only strings
all_texts = filter(lambda text: isinstance(text, basestring), \
all_texts)
all_texts = [t for t in all_texts if isinstance(t, basestring)]
if all_texts or self.index.length():
return self.index.index_doc(documentId, all_texts)
return res
Expand Down

0 comments on commit f16f86b

Please sign in to comment.