[ZCM] [ZC] 1638/ 4 Resolve "ZCatalog problems searching objects"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Aug 16 06:34:32 EDT 2005


Issue #1638 Update (Resolve) "ZCatalog problems searching objects"
 Status Resolved, Catalog/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1638

==============================================================
= Resolve - Entry #4 by ajung on Aug 16, 2005 6:34 am

 Status: Pending => Resolved

I fixed the problem with calling refreshCatalog() from a ZEO client script caused by the unavailability of self.REQUEST. But I did not accept your patch which did not solve the problem in a sane way.
________________________________________
= Comment - Entry #3 by scamps on Jan 24, 2005 2:24 am

>From a ZEO Client it crashes becouse the sentence "obj = self.resolve_url(p, self.REQUEST)" produces an AttributeError (REQUEST is not an attribute of self without Zope).   

What I don't know is why, in some cases, after the sentence "obj = self.resolve_path(url)" the instruction "if not obj" differs from "if obj is None".  Perhaps some behaviour of Booleans, I don't know.

________________________________________
= Comment - Entry #2 by ajung on Jan 23, 2005 3:35 am

"""
but it crash when trying to refreshCatalog from a simple python ZEO client
"""

please explain when and why this happens.
________________________________________
= Request - Entry #1 by scamps on Dec 27, 2004 6:08 am


Uploaded:  "ZCatalog_not_obj.patch"
 - http://www.zope.org/Collectors/Zope/1638/ZCatalog_not_obj.patch/view
In ZCatalog/ZCatalog.py there are some sentences "if not obj" that are not working fine.  I've found some cases where this sentence is true when "obj" is not None.  I think this will not affect people reindexing from ZMI, becouse of the following "obj = self.resolve_url(p, self.REQUEST)" sentence,  but it crash when trying to refreshCatalog from a simple python ZEO client.   Replacing all "if not obj" for "if obj is None" solve all the problems.   I attach a patch to do it.
==============================================================



More information about the Zope-Collector-Monitor mailing list