Hi,

I belive that from app point of view, a call to a non-existent url should
not return a page.

Return a error makes more sense, and also give the opportunity to the
developer handle this case in different ways for each project, don't you
think?


--
Leon Waldman
SysAdmin Linux - Arquiteto de Infra-Estrutura & TI.


On Tue, Sep 8, 2009 at 5:05 PM, W. Martin Borgert <[email protected]>wrote:

>
> Hi,
>
> when one has defined an URL in web.py, that is not implemented, one
> gets an "internal error". I'ld prefer to have a notfound instead.
> This change works for me, but I'm not sure, whether it is the right
> way to do. Please comment.
>
> --- application.py.orig 2009-09-08 15:58:08.000000000 +0200
> +++ application.py      2009-09-08 15:55:35.000000000 +0200
> @@ -408,7 +408,10 @@
>                  mod = __import__(mod, globals(), locals(), [""])
>                  cls = getattr(mod, cls)
>              else:
> -                cls = fvars[f]
> +                try:
> +                    cls = fvars[f]
> +                except:
> +                    return web.notfound()
>              return handle_class(cls)
>          elif hasattr(f, '__call__'):
>              return f()
>
> Thanks in advance!
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to