also should handle InvalidUsage exception

This commit is contained in:
Yun Xu 2017-06-10 09:42:48 -07:00
parent d86e603c07
commit 071bc23411

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())):