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
-~----------~----~----~----~------~----~------~--~---