[Zope-Checkins] CVS: Products/PluginIndexes/TextIndex - TextIndex.py:1.11

Andreas Jung andreas@digicool.com
Tue, 31 Jul 2001 15:54:41 -0400


Update of /cvs-repository/Products/PluginIndexes/TextIndex
In directory cvs.zope.org:/tmp/cvs-serv10573

Modified Files:
	TextIndex.py 
Log Message:
changed aquisition of lexicon to be implicit

 
=== Products/PluginIndexes/TextIndex/TextIndex.py 1.10 => 1.11 ===
             ## if no lexicon is provided, create a default one
             try:
-                self._lexicon = self.aq_parent.aq_parent[self.vocabulary_id].getLexicon()
+                self._lexicon = self.aq_parent.getattr(self.vocabulary_id).getLexicon()
             except:                
                 self._lexicon = Lexicon()
                 self.vocabulary_id = '__intern__'
 
         return self._lexicon
 
-
-        if self._lexicon:
-            return self._lexicon
-        else:
-            return self.aq_parent.aq_parent[self.vocabulary_id].getLexicon()
 
 
     def __nonzero__(self):