[Zope-Checkins] CVS: Products/ZCatalog - Lazy.py:1.9.22.1
Martijn Pieters
mj at zopatista.com
Fri Jun 25 19:18:24 EDT 2004
Update of /cvs-repository/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv3017/lib/python/Products/ZCatalog
Modified Files:
Tag: Zope-2_7-branch
Lazy.py
Log Message:
Collector #1384: Fixed LazyCat length calculation after all contained
sequences have been fully accessed.
=== Products/ZCatalog/Lazy.py 1.9 => 1.9.22.1 ===
--- Products/ZCatalog/Lazy.py:1.9 Wed Dec 11 13:56:58 2002
+++ Products/ZCatalog/Lazy.py Fri Jun 25 19:17:53 2004
@@ -117,9 +117,12 @@
try:
return self._len
except:
- l = 0
- for s in self._seq:
- l += len(s)
+ try:
+ l = 0
+ for s in self._seq:
+ l += len(s)
+ except AttributeError:
+ l = len(self._data)
self._len = l
return l
More information about the Zope-Checkins
mailing list