On Wed, 2009-09-16 at 10:55 +0200, Douglas Mayle wrote:
> I'm not exactly sure, but I've done some similar things which have  
> worked, so I might be able to help out.  First of all, instead of  
> using default, you should probably be using __call__, like in:
> http://projects.mayle.org/hg/DVDev/file/c0c8da51a663/dvdev/controllers/mercurialgateway.py#l44

I had that thought too, but when I used call, failing the predicate
meant that the wsgi controller returned nothing and I got an exception
( and not a 403 ) about the wsgi controller returning nothing. What did
work with __call__ was manually going:


which raises the right exception, but then I would have to roll the
error handling myself.

> But what's more likely causing the problem is using the protect_action  
> instead of ControllerProtector, like in:
> https://source.openplans.org/hg/communityalmanac/file/d5eaab92ec5c/communityalmanac/controllers/admin.py
> #l20

I though of that too, and even weirder, protecting the wsgi controller
with ControllerProtector didn't do anything! Mind you I couldn't use the
decorator because we have to deploy on py2.5.

Thanks for the tips though,

Repoze-dev mailing list

Reply via email to