selectors.py
branchstable
changeset 8395 41729460d8c3
parent 8034 b07d61090706
child 8397 42ec34b3ced9
child 8746 88c71ad83d47
--- a/selectors.py	Wed May 02 10:12:02 2012 +0200
+++ b/selectors.py	Thu May 10 10:33:42 2012 +0200
@@ -641,8 +641,9 @@
 
     @lltrace
     def __call__(self, cls, req, rset=None, **kwargs):
-        # 'or 0' since we *must not* return None
-        return rset and self.match_expected(len(rset.rows[0])) or 0
+        # 'or 0' since we *must not* return None. Also don't use rset.rows so
+        # this selector will work if rset is a simple list of list.
+        return rset and self.match_expected(len(rset[0])) or 0
 
 
 class paginated_rset(Selector):