mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 02:36:02 +02:00
Fix linting
This commit is contained in:
parent
a1ec157dbb
commit
d68e82a130
1 changed files with 9 additions and 12 deletions
|
@ -44,36 +44,33 @@ class Command(BaseCommand):
|
|||
|
||||
# Call security_contact on all domains to trigger saving contact information
|
||||
for domain in domains:
|
||||
contact = domain.security_contact
|
||||
self.contacts_saved_count+=1
|
||||
contact = domain.security_contact # noqa on these items as we only want to call security_contact
|
||||
self.contacts_saved_count += 1
|
||||
|
||||
logger.info(f"Found {self.contacts_saved_count} security contacts.")
|
||||
|
||||
# Update EPP contact for domains with a security contact
|
||||
for domain in domains:
|
||||
try:
|
||||
logger.info(
|
||||
f"Domain {domain.domain_info} security contact: {domain.security_contact.email}"
|
||||
)
|
||||
logger.info(f"Domain {domain.domain_info} security contact: {domain.security_contact.email}")
|
||||
if domain.security_contact.email != "registrar@dotgov.gov":
|
||||
domain._update_epp_contact(contact=domain.security_contact)
|
||||
self.disclosed_domain_contacts_count+=1
|
||||
self.disclosed_domain_contacts_count += 1
|
||||
else:
|
||||
logger.info(
|
||||
f"Skipping disclose for {domain.domain_info} security contact {domain.security_contact.email}."
|
||||
)
|
||||
self.skipped_domain_contacts_count+=1
|
||||
self.skipped_domain_contacts_count += 1
|
||||
except Exception as err:
|
||||
# error condition if domain not in database
|
||||
self.domains_with_errors.append(copy.deepcopy(domain.domain_info))
|
||||
logger.error(
|
||||
f"error retrieving domain {domain.domain_info} contact {domain.security_contact}: {err}"
|
||||
)
|
||||
logger.error(f"error retrieving domain {domain.domain_info} contact {domain.security_contact}: {err}")
|
||||
|
||||
# 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"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(
|
||||
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