mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
Fix linting
This commit is contained in:
parent
a1ec157dbb
commit
d68e82a130
1 changed files with 9 additions and 12 deletions
|
@ -44,7 +44,7 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
# Call security_contact on all domains to trigger saving contact information
|
# Call security_contact on all domains to trigger saving contact information
|
||||||
for domain in domains:
|
for domain in domains:
|
||||||
contact = domain.security_contact
|
contact = domain.security_contact # noqa on these items as we only want to call security_contact
|
||||||
self.contacts_saved_count += 1
|
self.contacts_saved_count += 1
|
||||||
|
|
||||||
logger.info(f"Found {self.contacts_saved_count} security contacts.")
|
logger.info(f"Found {self.contacts_saved_count} security contacts.")
|
||||||
|
@ -52,9 +52,7 @@ class Command(BaseCommand):
|
||||||
# Update EPP contact for domains with a security contact
|
# Update EPP contact for domains with a security contact
|
||||||
for domain in domains:
|
for domain in domains:
|
||||||
try:
|
try:
|
||||||
logger.info(
|
logger.info(f"Domain {domain.domain_info} security contact: {domain.security_contact.email}")
|
||||||
f"Domain {domain.domain_info} security contact: {domain.security_contact.email}"
|
|
||||||
)
|
|
||||||
if domain.security_contact.email != "registrar@dotgov.gov":
|
if domain.security_contact.email != "registrar@dotgov.gov":
|
||||||
domain._update_epp_contact(contact=domain.security_contact)
|
domain._update_epp_contact(contact=domain.security_contact)
|
||||||
self.disclosed_domain_contacts_count += 1
|
self.disclosed_domain_contacts_count += 1
|
||||||
|
@ -66,14 +64,13 @@ class Command(BaseCommand):
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
# error condition if domain not in database
|
# error condition if domain not in database
|
||||||
self.domains_with_errors.append(copy.deepcopy(domain.domain_info))
|
self.domains_with_errors.append(copy.deepcopy(domain.domain_info))
|
||||||
logger.error(
|
logger.error(f"error retrieving domain {domain.domain_info} contact {domain.security_contact}: {err}")
|
||||||
f"error retrieving domain {domain.domain_info} contact {domain.security_contact}: {err}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Inform user how many contacts were disclosed, skipped, and errored
|
# Inform user how many contacts were disclosed, skipped, and errored
|
||||||
logger.info(f"Updated {self.disclosed_domain_contacts_count} contacts to disclosed.")
|
logger.info(f"Updated {self.disclosed_domain_contacts_count} contacts to disclosed.")
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Skipped disclosing {self.skipped_domain_contacts_count} contacts with security email registrar@dotgov.gov."
|
f"Skipped disclosing {self.skipped_domain_contacts_count} contacts with security \
|
||||||
|
email registrar@dotgov.gov."
|
||||||
)
|
)
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Error disclosing the following {len(self.domains_with_errors)} contacts: {self.domains_with_errors}"
|
f"Error disclosing the following {len(self.domains_with_errors)} contacts: {self.domains_with_errors}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue