[ZPatterns] mystery with restrictedTraverse

Steve Alexander steve@cat-box.net
Sat, 08 Sep 2001 12:46:53 +0100


Joachim Schmitz wrote:

 >
 >
 >   <P>
 >   <STRONG>Error Type: NameError</STRONG><BR>
 >   <STRONG>Error Value: global name \'has\' is not defined</STRONG><BR>
 >   </P>
 >
 > The most strange thing is that worked with 2.4.1b1, after installing 
2.4.1
 > final it failed.
 >
 > I just tested it with 2.3.3 there it works too.
 > With a normal folder in a subfolder it works too.
 >
 > Any hint is apreacheated.


It is a bug in 2.4.1 final.

You need to alter lib/OFS/Traversable.py, line 144, and insert the line

    has=hasattr

after the existing get=getattr

--
Steve Alexander
Software Engineer
Cat-Box limited