diff --git a/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py b/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py index 4ba33f252b..c3a5f5b736 100644 --- a/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py +++ b/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py @@ -9,11 +9,12 @@ This management command will manually trigger the receivers we care about. (We don't want to trigger all receivers for these signals, since these are busy signals.) """ -from __future__ import print_function, division +from __future__ import absolute_import, division, print_function + import logging import math -import time import sys +import time import dateutil.parser from django.contrib.auth.models import User @@ -21,6 +22,7 @@ from django.core.management.base import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from pytz import UTC +from six.moves import range from lms.djangoapps.certificates.api import get_recently_modified_certificates from lms.djangoapps.grades.api import get_recently_modified_grades @@ -29,7 +31,6 @@ from openedx.core.djangoapps.credentials.signals import handle_cert_change, send from openedx.core.djangoapps.programs.signals import handle_course_cert_changed from openedx.core.djangoapps.site_configuration.models import SiteConfiguration - log = logging.getLogger(__name__) diff --git a/openedx/core/djangoapps/credentials/tasks/v1/tasks.py b/openedx/core/djangoapps/credentials/tasks/v1/tasks.py index ea11d0be50..b01f426b8e 100644 --- a/openedx/core/djangoapps/credentials/tasks/v1/tasks.py +++ b/openedx/core/djangoapps/credentials/tasks/v1/tasks.py @@ -1,6 +1,8 @@ """ This file contains celery tasks for credentials-related functionality. """ +from __future__ import absolute_import + from celery import task from celery.utils.log import get_task_logger from django.conf import settings @@ -9,7 +11,6 @@ from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.credentials.utils import get_credentials_api_client - logger = get_task_logger(__name__) # Under cms the following setting is not defined, leading to errors during tests.