[FIX] unknow route must return 404 not 500

bzr revid: chs@openerp.com-20120814131159-0ie5h6tnxdgebpva
This commit is contained in:
Christophe Simonis 2012-08-14 15:11:59 +02:00
parent b7a5629052
commit 8c43267c4a
1 changed files with 2 additions and 2 deletions

View File

@ -565,8 +565,8 @@ class Root(object):
while ps:
c = controllers_path.get(ps)
if c:
m = getattr(c, meth)
if getattr(m, 'exposed', False):
m = getattr(c, meth, None)
if m and getattr(m, 'exposed', False):
_logger.debug("Dispatching to %s %s %s", ps, c, meth)
return m
ps, _slash, meth = ps.rpartition('/')