Code

Added 'Users may only edit their issues' customisation example.
[roundup.git] / roundup / indexer.py
index e4d1d59b02c186e522b9b3addc707bd52ffe7c6a..ef697d938f968bb475c57026124f45ad64fdfcfd 100644 (file)
@@ -14,7 +14,7 @@
 #     that promote freedom, but obviously am giving up any rights
 #     to compel such.
 # 
-#$Id: indexer.py,v 1.14 2002-09-25 05:06:14 richard Exp $
+#$Id: indexer.py,v 1.16 2003-01-14 03:56:44 richard Exp $
 '''
 This module provides an indexer class, RoundupIndexer, that stores text
 indices in a roundup instance.  This class makes searching the content of
@@ -221,6 +221,8 @@ class Indexer:
             if hits is None:
                 hits = {}
                 for k in entry.keys():
+                    if not self.fileids.has_key(k):
+                        raise ValueError, 'Index is corrupted: re-generate it'
                     hits[k] = self.fileids[k]
             else:
                 # Eliminate hits for every non-match