From c29b7520a11225413f5503f0633e1ac020086bad Mon Sep 17 00:00:00 2001 From: Ayub khan Date: Mon, 30 Sep 2019 16:53:03 +0500 Subject: [PATCH] BOM-850 python3 compatibility --- common/lib/xmodule/xmodule/video_module/video_handlers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py index 01b7eff45a..386ca42240 100644 --- a/common/lib/xmodule/xmodule/video_module/video_handlers.py +++ b/common/lib/xmodule/xmodule/video_module/video_handlers.py @@ -534,7 +534,12 @@ class VideoStudioViewHandlers(object): video=self, lang=language, output_format=Transcript.SRT ) response = Response(transcript_content, headerlist=[ - ('Content-Disposition', 'attachment; filename="{}"'.format(transcript_name.encode('utf8'))), + ( + 'Content-Disposition', + 'attachment; filename="{}"'.format( + transcript_name.encode('utf8') if six.PY2 else transcript_name + ) + ), ('Content-Language', language), ('Content-Type', mime_type) ])