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

I do not really understand what happens.

I added a third parameter to (in ZopeGuards.py)
def guarded_hasattr(object, name, xx=None):
    if xx:
        print 'xx->', xx
    try:
        guarded_getattr(object, name)
    except (AttributeError, Unauthorized):
        return 0
    return 1

Now whenever I change to a folder, I get 
xx-> has_order_support
printed on the console.

I grepped for has_order_support to find out where this happens, but did not 
find it.

Robert

On Tuesday 13 January 2004 17:59, Tres Seaver wrote:
> robert wrote:
> > I refreshed my 2.7 from CVS this morning (7.30 MEZ) and get the following
> > traceback:
>
> This is my bad, I'm pretty sure.  Was this just trying to get into the
> ZMI, or was there another application / template which triggered the
> problem?  At any rate, the fix is likely to be to add 'guarded_hasattr'
> to the list of items which should be wrapped;  on the 2.7 branch, this
> list is at the bottom of AccessControl.Implementation.
>
> > Robert
> >
> > Site Error
> >
> > An error was encountered while publishing this resource.
> >
> > TypeError
> > Sorry, a site error occurred.
> >
> > Traceback (innermost last):
> >
> >     * Module ZPublisher.Publish, line 163, in publish_module_standard
> >     * Module Products.PlacelessTranslationService.PatchStringIO, line 45,
> > in new_publish
> >     * Module ZPublisher.Publish, line 127, in publish
> >     * Module Zope.App.startup, line 203, in zpublisher_exception_hook
> >     * Module ZPublisher.Publish, line 100, in publish
> >     * Module ZPublisher.mapply, line 88, in mapply
> >     * Module ZPublisher.Publish, line 40, in call_object
> >     * Module Shared.DC.Scripts.Bindings, line 261, in __call__
> >     * Module Shared.DC.Scripts.Bindings, line 292, in _bindAndExec
> >     * Module App.special_dtml, line 175, in _exec
> >     * Module DocumentTemplate.DT_Let, line 75, in render
> >     * Module DocumentTemplate.DT_Util, line 201, in eval
> >       __traceback_info__: _
> >     * Module <string>, line 0, in ?
> >
> > TypeError: guarded_hasattr() takes exactly 2 arguments (3 given) (Also,
> > an error occurred while attempting to render the standard error message.)
>
> Tres.


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

Reply via email to