Skip to content

Commit 1cb567f

Browse files
committed
Fixed some pyflakes issues.
- Legacy-Id: 15506
1 parent 27fdcd7 commit 1cb567f

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

ietf/person/management/commands/deactivate_email_addresses.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22
# -*- coding: utf-8 -*-
33
from __future__ import unicode_literals, print_function
44

5-
import datetime
6-
import email
75
import flufl.bounce
86
import mailbox
9-
import re
10-
import time
7+
import sys
118

129
from tqdm import tqdm
1310

14-
from django.conf import settings
1511
from django.core.exceptions import ValidationError
16-
from django.core.management.base import BaseCommand, CommandError
12+
from django.core.management.base import BaseCommand
1713
from django.core.validators import validate_email
1814

1915
import debug # pyflakes:ignore
@@ -26,8 +22,7 @@ class Command(BaseCommand):
2622
Deactivate bouncing email addresses.
2723
2824
Take one or more email addresses to deactivate from the command line,
29-
or read delivery-status emails from an mbox file and extract addresses
30-
with delivery failures from that, and mark them inactive.
25+
or read delivery-status emails from an mbox file and extract addresses with delivery failures from that, and mark them inactive.
3126
3227
""")
3328

@@ -87,7 +82,7 @@ def handle(self, *args, **options):
8782
email.active = False
8883
email.origin = email.person.user.username if email.person.user_id else ('script: %s deactivation' % options['reason'])
8984
email.save()
90-
event = PersonEvent.objects.create(person=email.person, type='email_address_deactivated',
85+
PersonEvent.objects.create(person=email.person, type='email_address_deactivated',
9186
desc="Deactivated the email addres <%s>. Reason: %s" % (email.address, options['reason']) )
9287
else:
9388
if email is None:

0 commit comments

Comments
 (0)