[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - Catalog.py:1.80
Andreas Jung
andreas@zope.com
Tue, 13 Nov 2001 15:36:54 -0500
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv5544/lib/python/Products/ZCatalog
Modified Files:
Catalog.py
Log Message:
removed code that has gone into check_catalog.py
=== Zope/lib/python/Products/ZCatalog/Catalog.py 1.79 => 1.80 ===
- def checkConsistency(self):
- """ perform some consistency checks on the catalog """
- from types import IntType
- from BTrees.IIBTree import IISet,difference,intersection
-
- l_data = list(self.data.keys())
- l_data.sort()
- l_uids = list(self.uids.values())
- l_uids.sort()
- l_paths = list(self.data.keys())
- l_paths.sort()
-
- assert l_data == l_uids
- assert l_data == l_paths
-
- for id,idx in self.indexes.items():
-
- if idx.meta_type == 'FieldIndex':
-
- RIDS = IISet()
- for key, rids in idx._index.items():
- if isinstance(rids,IntType):
- RIDS.insert( rids )
- else:
- map(RIDS.insert , rids.keys())
-
- diff = difference(RIDS, IISet(self.data.keys()))
- assert len(diff)==0,'Index %s: problem with forward entries' % id
-
-
- RIDS = IISet()
- for key, rids in idx._index.items():
- if isinstance(rids,IntType):
- RIDS.insert( rids )
- else:
- map(RIDS.insert , rids.keys())
-
- diff = difference(RIDS, IISet(self.data.keys()))
- assert len(diff)==0,'Index %s: problems with backward entries' % id
-
-
-
-
class CatalogError(Exception): pass