[Zope-dev] bug in CatalogAwareness?

Steve Alexander steve@cat-box.net
Sun, 27 Aug 2000 14:28:23 +0100


Steve Alexander wrote:

> Shane Hathaway wrote:
> 
> > 
> > I was suspicious of the entire method so I wrote a replacement which is
> > based on a new interface available in Zope.  I *think* it's correct,
> > but it's a drastic change so it's only in the new PTK and nowhere
> > else.  (This is slightly modified from PTK CVS.)
> > 
> >     def __url(self):
> >         return string.join(self.getPhysicalPath(), '/')
> 
> 
> The implementation of url() in CatalogAwareness.py in Zope 2.2.1 seems
> to ensure that there is a '/' at the start of the url that is given to
> the ZCatalog. I don't know how important that really is, though.
> 
> Perhaps your method should be changed to this:
> 
> def __url(self):
> return '/'+string.join(self.getPhysicalPath(), '/')

My mistake -- I just found out that getPhysiscalPath() returns a list 
with an empty string as the first element.

So, Shane's original version is just fine.

-- 
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net