also should handle InvalidUsage exception

This commit is contained in:
Yun Xu 2017-06-10 09:42:48 -07:00
parent 24b946e850
commit cf30ed745c

View File

@ -353,7 +353,7 @@ class Router:
"""
try:
handler = self.get(request)[0]
except NotFound:
except (NotFound, InvalidUsage):
return False
if (hasattr(handler, 'view_class') and
hasattr(handler.view_class, request.method.lower())):