recovery the flask8 error
This commit is contained in:
parent
65d80ec11b
commit
28bdac46f6
|
@ -99,7 +99,8 @@ class Blueprint:
|
|||
def decorator(handler):
|
||||
if isinstance(handler, MethodType):
|
||||
raise SanicTypeException("You can`t add a instance "
|
||||
"method as a blueprint router handler")
|
||||
"method as a blueprint "
|
||||
"router handler")
|
||||
route = FutureRoute(handler, uri, methods, host, strict_slashes)
|
||||
self.routes.append(route)
|
||||
return handler
|
||||
|
@ -129,7 +130,8 @@ class Blueprint:
|
|||
methods = handler.handlers.keys()
|
||||
if isinstance(handler, MethodType):
|
||||
raise SanicTypeException("You can`t add a "
|
||||
"instance method as a blueprint router handler")
|
||||
"instance method as a blueprint "
|
||||
"router handler")
|
||||
|
||||
self.route(uri=uri, methods=methods, host=host,
|
||||
strict_slashes=strict_slashes)(handler)
|
||||
|
|
Loading…
Reference in New Issue
Block a user