From 84cfb8d1ecefe0e3e9b506087ca5dacb86e64163 Mon Sep 17 00:00:00 2001 From: arbisoft Date: Thu, 22 Aug 2019 15:54:53 +0500 Subject: [PATCH] BOM-392 Fixing encode/decode issues for python3. --- cms/djangoapps/contentstore/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/tasks.py b/cms/djangoapps/contentstore/tasks.py index b1f5f6d94a..1c125f0156 100644 --- a/cms/djangoapps/contentstore/tasks.py +++ b/cms/djangoapps/contentstore/tasks.py @@ -33,6 +33,7 @@ from organizations.models import OrganizationCourse from path import Path as path from pytz import UTC from six import iteritems, text_type +from six.moves import range from user_tasks.models import UserTaskArtifact, UserTaskStatus from user_tasks.tasks import UserTask @@ -102,7 +103,7 @@ def enqueue_update_thumbnail_tasks(course_videos, videos_per_task, run): start = 0 end = videos_per_task chunks_count = int(ceil(batch_size / float(videos_per_task))) - for __ in xrange(0, chunks_count): + for __ in range(0, chunks_count): # pylint: disable=C7620 course_videos_chunk = course_videos[start:end] tasks.append(task_scrape_youtube_thumbnail.s( course_videos_chunk, run