Commit 0177cda7 authored by Andreas Jung's avatar Andreas Jung

changed aquisition of lexicon to be implicit

parent e85bd15e
......@@ -87,7 +87,7 @@
"""
__version__ = '$Revision: 1.10 $'[11:-2]
__version__ = '$Revision: 1.11 $'[11:-2]
import string, re
......@@ -204,7 +204,7 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
if self._lexicon is None:
## 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__'
......@@ -212,11 +212,6 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
return self._lexicon
if self._lexicon:
return self._lexicon
else:
return self.aq_parent.aq_parent[self.vocabulary_id].getLexicon()
def __nonzero__(self):
return not not self._unindex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment