Include werkzeug Response type in typecheck.

This commit is contained in:
voussoir 2017-09-18 14:10:25 -07:00
parent e592b55fb1
commit f4ee7ddd9e

View file

@ -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