[Zope-dev] Bug in FindSupport.py?

Stefan Franke sfranke@cdc-group.com
Wed, 17 Mar 1999 22:17:16 +0100


In OFS.Findsupport, line 159, I found

            if hasattr(ob, 'aq_base'):
                bs=ob.aq_base

            if (
                (not obj_ids or absattr(bs.id) in obj_ids)

[...]

That is a conditional assignment to bs, an bs is used later on in any
case.
Shouldn't there be an else-fork, like

            if hasattr(ob, 'aq_base'):
                bs=ob.aq_base
            else:
                bs=ob

if the object is accessed without an aquisition wrapper? This lead to an

error with one of my products, but propably my product is still faulty, 
and this only reveals the above problems.

Stefan