diff --git a/lms/templates/support/index.html b/lms/templates/support/index.html
index dc263ea624..1bd5a05451 100644
--- a/lms/templates/support/index.html
+++ b/lms/templates/support/index.html
@@ -1,6 +1,7 @@
## mako
<%page expression_filter="h"/>
<%!
+import six
from django.urls import reverse
from django.utils.translation import ugettext as _
%>
@@ -17,7 +18,7 @@ ${_("Student Support")}
${_("Student Support")}
diff --git a/openedx/core/djangoapps/safe_sessions/middleware.py b/openedx/core/djangoapps/safe_sessions/middleware.py
index 5443bae960..d08aa2f8b8 100644
--- a/openedx/core/djangoapps/safe_sessions/middleware.py
+++ b/openedx/core/djangoapps/safe_sessions/middleware.py
@@ -160,7 +160,7 @@ class SafeCookieData(object):
))
return safe_cookie_data
- def __unicode__(self):
+ def __str__(self):
"""
Returns a string serialization of the safe cookie data.
"""
@@ -202,7 +202,7 @@ class SafeCookieData(object):
hash_func = sha256()
for data_item in [self.version, self.session_id, user_id]:
hash_func.update(six.b(six.text_type(data_item)))
- hash_func.update(b'|')
+ hash_func.update(six.b('|'))
return hash_func.hexdigest()
@staticmethod
@@ -317,7 +317,6 @@ class SafeSessionMiddleware(SessionMiddleware):
Step 4. Delete the cookie, if it's marked for deletion.
"""
-
response = super(SafeSessionMiddleware, self).process_response(request, response) # Step 1
if not _is_cookie_marked_for_deletion(request) and _is_cookie_present(response):