diff --git a/zerver/tornado/handlers.py b/zerver/tornado/handlers.py index 47473374ed..fb4f2e3541 100644 --- a/zerver/tornado/handlers.py +++ b/zerver/tornado/handlers.py @@ -2,7 +2,6 @@ import sys import tornado.web import logging -import six from django import http from django.conf import settings from django.core.handlers.wsgi import WSGIRequest, get_script_name @@ -129,7 +128,7 @@ class AsyncDjangoHandler(tornado.web.RequestHandler, base.BaseHandler): mw_instance = mw_class() except MiddlewareNotUsed as exc: if settings.DEBUG: - if six.text_type(exc): + if str(exc): base.logger.debug('MiddlewareNotUsed(%r): %s', middleware_path, exc) else: base.logger.debug('MiddlewareNotUsed: %r', middleware_path)