Fixes from Anthony Baxter for some serious ZCatalog bugs. From
Anthony's collector submission: Title: current cvs zcatalog lexicon/vocab support is broken At: http://classic.zope.org:8080/Collector/Collector/1071/sview Submitter: Anthony Baxter Description: The current CVS version of ZCatalog has a couple of nasty bugs in it. First off, the standard Lexicon uses a variable 'self.counter', without ever initialising it. Oops. Secondly, Catalog handles the default Lexicon inconsistently. In the case of a lexicon being provided, it stores the name as self.lexicon, otherwise it stores a Lexicon _object_ as self.lexicon. Later on, it tries to do a getattr with the lexicon object as the second arg. The first bug utterly breaks non-globbing Lexicons. The second bug breaks textindexes that don't provide a lexicon at creation time. A patch for both follows. [Rather, this checkin commits both.] Note that the patch tries to handle gracefully existing Catalogs and Lexicons that might be broken.
Showing
Please register or sign in to comment