Commit f8d8c810 authored by Casey Duncan's avatar Casey Duncan

Fixed getLexicon so that it can properly raise an error when it cannot find...

Fixed getLexicon so that it can properly raise an error when it cannot find the proper lexicon object.
parent 471b053f
...@@ -124,7 +124,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem): ...@@ -124,7 +124,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
lexicon = getattr(aq_parent(aq_inner(self)), self.lexicon_id) lexicon = getattr(aq_parent(aq_inner(self)), self.lexicon_id)
if not ILexicon.isImplementedBy(lexicon): if not ILexicon.isImplementedBy(lexicon):
raise TypeError('Object "%s" is not a ZCTextIndex Lexicon' raise TypeError('Object "%s" is not a ZCTextIndex Lexicon'
% lexicon.getId()) % repr(lexicon))
self._v_lexicon = lexicon self._v_lexicon = lexicon
return lexicon return lexicon
......
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