Hi Robert,

 > Hi Tres,
 > Adding 'guarded_hasattr' to the list of items wrapped items did not help.

 I guess You have taken Tres too literally. I did the same (i.e. adding
the string 'guarded_hasattr' to the _NEED_WRAPPING list) and could
reproduce Your issue. After wandering through the code a while I think
Tres meant the function "guarded_hasattr" to be registered under the
name "hasattr" ...
 > I do not really understand what happens.

 I don't either, but the follwing works for me :)

diff -w -u -r1.1.2.2 Implementation.py
--- AccessControl/Implementation.py     12 Jan 2004 23:58:39 -0000
+++ AccessControl/Implementation.py     15 Jan 2004 18:38:34 -0000
@@ -92,7 +92,7 @@
 from DocumentTemplate import DT_Util
 from ZopeGuards import safe_builtins
-_NEED_WRAPPING = ('max', 'min', 'iter', 'enumerate', 'sum')
+_NEED_WRAPPING = ('max', 'min', 'iter', 'enumerate', 'sum', 'hasattr')
 for k, v in safe_builtins.items():
     if k in _NEED_WRAPPING:


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to