[Zope-Checkins] CVS: Zope2 - UnTextIndex.py:1.33.2.6
Jim Fulton
jim@digicool.com
Sat, 17 Mar 2001 10:38:09 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/SearchIndex
In directory korak:/tmp/cvs-serv15963
Modified Files:
Tag: zope-2_3-branch
UnTextIndex.py
Log Message:
Added (back) some weird logic that seems to be necessary to support
some old broken lexicon settings.
--- Updated File UnTextIndex.py in package Zope2 --
--- UnTextIndex.py 2001/03/15 13:10:33 1.33.2.5
+++ UnTextIndex.py 2001/03/17 15:38:08 1.33.2.6
@@ -180,7 +180,12 @@
in this way, but I don't see too much of a problem with it."""
if type(vocab_id) is not StringType:
- return vocab_id
+ vocab = vocab_id # we already havd the lexicon
+
+ # Through some sick hysterical accident, some lexicons
+ # simply wrap other lexicons, unless they don't. Waaaaaa.
+ vocab = getattr(vocab, 'lexicon', vocab)
+ return vocab
else:
vocab = getattr(self, vocab_id)
return vocab.lexicon