Fixing python3
This commit is contained in:
Awais Qureshi
2019-09-17 19:00:05 +05:00
parent c4796b1269
commit a4428d751d

View File

@@ -107,7 +107,9 @@ class Command(BaseCommand):
# and consumed one at a time.
for task_arg_tuple in tasks._course_task_args(course_key, **options):
all_args.append(task_arg_tuple)
all_args.sort(key=lambda x: hashlib.md5(b'{!r}'.format(x)))
all_args.sort(key=lambda x: hashlib.md5('{!r}'.format(x).encode('utf-8')).digest())
for args in all_args:
yield {
'course_key': args[0],