a selector MUST NO return None
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 25 Jan 2010 19:18:59 +0100
changeset 4340 cc0fe6279181
parent 4339 fe93b670343d
child 4341 2d2aa2526c56
a selector MUST NO return None
selectors.py
--- a/selectors.py	Mon Jan 25 19:18:33 2010 +0100
+++ b/selectors.py	Mon Jan 25 19:18:59 2010 +0100
@@ -345,7 +345,7 @@
 
     @lltrace
     def __call__(self, cls, req, rset=None, row=None, col=0, **kwargs):
-        return rset and self.match_expected(len(rset.rows[0]))
+        return rset and self.match_expected(len(rset.rows[0])) or 0 # *must not* return None
 
 
 @objectify_selector