[Zope-dev] ZCatalog Bug: fix

Chris Withers chrisw@nipltd.com
Sat, 21 Jul 2001 12:17:41 +0100


This is a multi-part message in MIME format.
--------------843300D2F013A162082E107D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The attached patch fixes the bug I was experiencing.

I don't know why it needs to do what it does, but it was fairly obviously
missing.

Is it just me or are Catalog and ZCatalog quite messy?

Chris
--------------843300D2F013A162082E107D
Content-Type: text/plain; charset=us-ascii;
 name="Catalog.py.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Catalog.py.patch"

--- Catalog.py.original	Fri Jun 01 11:05:30 2001
+++ Catalog.py	Sat Jul 21 11:53:32 2001
@@ -560,6 +560,7 @@
             else:
                 try:
                     for k, intset in sort_index.items():
+                        if hasattr(intset, 'keys'): intset=intset.keys() 
                         append((k,LazyMap(self.__getitem__, intset)))
                 except AttributeError:
                     raise ValueError, (

--------------843300D2F013A162082E107D--