Comment 1 for bug 213311

Revision history for this message
Tres Seaver (tseaver) wrote : Re: [Bug 213311] [NEW] Zope 2.11b1: "BaseRequest.traverse" may fail without "__getitem__"

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dmaurer wrote:
> Public bug reported:
>
> When "ZPublisher.BaseRequest.BaseRequest" traverses over an object without "__getitem__"
> and the other lookup methods have failed, then a "TypeError" exception ("unsubscriptable oject")
> is raised rather than a "NotFound" exception. This causes a wrong response code to be generated
> ("500" (internal server error) rather than "404" (not found)).

I just tried adding a testcase for this, and couldn't provoke the error:
    the AttributeError on the object with no '__getitem__' got turned
into a NotFound. Can you provide a testcase?

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH+jSr+gerLs4ltQ4RAq58AJ0SG78p47cVhpVGHYrJAk+jzroQaACfRGU0
X2DxbSxGFwMp2zf2pkAbH0M=
=mn4d
-----END PGP SIGNATURE-----