[Checkins] SVN: z3c.contents/trunk/src/z3c/contents/value.py Always check explicit for None

Roger Ineichen roger at projekt01.ch
Sat Apr 12 18:44:39 EDT 2008


Log message for revision 85297:
  Always check explicit for None

Changed:
  U   z3c.contents/trunk/src/z3c/contents/value.py

-=-
Modified: z3c.contents/trunk/src/z3c/contents/value.py
===================================================================
--- z3c.contents/trunk/src/z3c/contents/value.py	2008-04-12 22:41:48 UTC (rev 85296)
+++ z3c.contents/trunk/src/z3c/contents/value.py	2008-04-12 22:44:38 UTC (rev 85297)
@@ -63,8 +63,8 @@
         """Check if one of the search terms is found in the searchable text
         interface.
         """
-        adapter = zope.component.queryAdapter(object, ISearchableText)
-        if not adapter:
+        adapter = ISearchableText(object, None)
+        if adapter is None:
             return False
         searchable = adapter.getSearchableText().lower()
         for term in [t.lower() for t in self.terms]:



More information about the Checkins mailing list