fix stream handling

This commit is contained in:
Raphael Deem 2017-12-13 22:59:02 -08:00
parent 2b0258c13a
commit 2c3f50e34a
2 changed files with 1 additions and 5 deletions

View File

@ -177,8 +177,6 @@ class URLBuildError(ServerError):
class FileNotFound(NotFound):
pass
def __init__(self, message, path, relative_url):
super().__init__(message)
self.path = path
@ -208,8 +206,6 @@ class HeaderNotFound(InvalidUsage):
@add_status_code(416)
class ContentRangeError(SanicException):
pass
def __init__(self, message, content_range):
super().__init__(message)
self.headers = {

View File

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