Commit 745913f5 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧
Browse files

rematch_developers: Update to Django 1.10

Make rematch_developers compatible with Django 1.10 by switching to a
BaseCommand class.
parent 5270af0b
......@@ -11,7 +11,7 @@
Usage: ./manage.py rematch_developers
"""
from django.core.management.base import NoArgsCommand
from django.core.management.base import BaseCommand
from django.db import transaction
import sys
......@@ -28,10 +28,10 @@
stream=sys.stderr)
logger = logging.getLogger()
class Command(NoArgsCommand):
class Command(BaseCommand):
help = "Match and map objects in database to developer emails"
def handle_noargs(self, **options):
def handle(self, **options):
v = int(options.get('verbosity', None))
if v == 0:
logger.level = logging.ERROR
......@@ -78,7 +78,7 @@ def match_flagrequest(finder):
unmatched = FlagRequest.objects.filter(user__isnull=True).values_list(
'user_email', flat=True).order_by().distinct()
logger.info("%d email addresses retrieved", len(unmatched))
for user_email in unmatched:
logger.debug("email %s", user_email)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment