Include werkzeug Response type in typecheck.
This commit is contained in:
parent
e592b55fb1
commit
f4ee7ddd9e
1 changed files with 2 additions and 2 deletions
|
@ -2,6 +2,7 @@ import flask
|
||||||
from flask import request
|
from flask import request
|
||||||
import functools
|
import functools
|
||||||
import uuid
|
import uuid
|
||||||
|
import werkzeug.wrappers
|
||||||
|
|
||||||
from etiquette import helpers
|
from etiquette import helpers
|
||||||
|
|
||||||
|
@ -43,8 +44,7 @@ class SessionManager:
|
||||||
request.cookies['etiquette_session'] = token
|
request.cookies['etiquette_session'] = token
|
||||||
|
|
||||||
response = function(*args, **kwargs)
|
response = function(*args, **kwargs)
|
||||||
|
if not isinstance(response, (flask.Response, werkzeug.wrappers.Response)):
|
||||||
if not isinstance(response, flask.Response):
|
|
||||||
response = flask.Response(response)
|
response = flask.Response(response)
|
||||||
|
|
||||||
# Send the token back to the client
|
# Send the token back to the client
|
||||||
|
|
Loading…
Reference in a new issue