[Zope-dev] SearchIndex / Lexicon bug

richard@bizarsoftware.com.au richard@bizarsoftware.com.au
Wed, 07 Feb 2001 17:14:01 +1100


I just submitted a bug report to the collector, and didn't supply a patch.
I really should have, and here it is.

*** /tmp/Lexicon.py	Wed Feb  7 17:09:20 2001
--- lib/python/SearchIndex/Lexicon.py	Wed Feb  7 17:09:32 2001
***************
*** 158,164 ****
  
      def get(self, key, default=None):
          """Return the matched word against the key."""
!         return [self._lexicon.getWordId(key, default)]
  
  
      def __getitem__(self, key):
--- 158,164 ----
  
      def get(self, key, default=None):
          """Return the matched word against the key."""
!         return [self._lexicon.get(key, default)]
  
  
      def __getitem__(self, key):


I won't supply a patch for the other bug reported - ZCatalog/Catalog.py
being to munchy with the exceptions - because I'm not entirely sure what
the original purpose of the try/except clause is. As I mentioned in the bug
report, I'm pretty sure it wasn't supposed to catch AttributeErrors. It's
no longer in our code at all, and I'll let you know if that causes
problems...


    Richard

-- 
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)