From 94c6ae51d70156bc23a400635d60ae3b99df3e73 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Fri, 7 Jun 2013 00:56:21 +0100 Subject: [PATCH] Some small cleanup --- flask/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/app.py b/flask/app.py index 267c9c00..ae534514 100644 --- a/flask/app.py +++ b/flask/app.py @@ -34,7 +34,7 @@ from .templating import DispatchingJinjaLoader, Environment, \ _default_template_ctx_processor from .signals import request_started, request_finished, got_request_exception, \ request_tearing_down, appcontext_tearing_down -from ._compat import reraise, string_types, integer_types +from ._compat import reraise, string_types, text_type, integer_types # a lock used for logger initialization _logger_lock = Lock() @@ -1572,7 +1572,7 @@ class Flask(_PackageBoundObject): # set the headers and status. We do this because there can be # some extra logic involved when creating these objects with # specific values (like default content type selection). - if isinstance(rv, string_types + (bytes, )): + if isinstance(rv, (text_type, bytes, bytearray)): rv = self.response_class(rv, headers=headers, status=status) headers = status = None else: