[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/common - UnIndex.py:1.18

Andreas Jung andreas@andreas-jung.com
Sun, 23 Feb 2003 08:18:34 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/common
In directory cvs.zope.org:/tmp/cvs-serv19508/common

Modified Files:
	UnIndex.py 
Log Message:
extra.indexed_attrs is now optional. leaving this input field
empty lead to an empty index.


=== Zope/lib/python/Products/PluginIndexes/common/UnIndex.py 1.17 => 1.18 ===
--- Zope/lib/python/Products/PluginIndexes/common/UnIndex.py:1.17	Thu Jan 23 12:46:33 2003
+++ Zope/lib/python/Products/PluginIndexes/common/UnIndex.py	Sun Feb 23 08:18:34 2003
@@ -88,7 +88,8 @@
         try: 
             self.indexed_attrs = extra.indexed_attrs.split(',')
             self.indexed_attrs = [ attr.strip() for attr in  self.indexed_attrs if attr ]
-        except: self.indexed_attrs = [ self.id ]
+        except: pass 
+        if len(self.indexed_attrs) == 0: self.indexed_attrs = [ self.id ]
         
         self.__len__=BTrees.Length.Length() # see __len__ method docstring
         self.clear()