mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
formatting for linting
This commit is contained in:
parent
182d1a61c0
commit
497e81f6fa
3 changed files with 12 additions and 30 deletions
|
@ -78,7 +78,7 @@ class DomainNameserverForm(forms.Form):
|
|||
NameserverError(
|
||||
code=nsErrorCodes.GLUE_RECORD_NOT_ALLOWED,
|
||||
nameserver=domain,
|
||||
ip=ip_list
|
||||
ip=ip_list,
|
||||
),
|
||||
)
|
||||
elif e.code == nsErrorCodes.MISSING_IP:
|
||||
|
@ -88,7 +88,7 @@ class DomainNameserverForm(forms.Form):
|
|||
code=nsErrorCodes.MISSING_IP,
|
||||
nameserver=domain,
|
||||
ip=ip_list,
|
||||
)
|
||||
),
|
||||
)
|
||||
else:
|
||||
self.add_error("ip", str(e))
|
||||
|
|
|
@ -39,10 +39,10 @@ class GenericError(Exception):
|
|||
"""
|
||||
|
||||
_error_mapping = {
|
||||
GenericErrorCodes.CANNOT_CONTACT_REGISTRY: "Update failed. Cannot contact the registry.",
|
||||
GenericErrorCodes.GENERIC_ERROR: (
|
||||
"Value entered was wrong."
|
||||
GenericErrorCodes.CANNOT_CONTACT_REGISTRY: (
|
||||
"Update failed. Cannot contact the registry."
|
||||
),
|
||||
GenericErrorCodes.GENERIC_ERROR: ("Value entered was wrong."),
|
||||
}
|
||||
|
||||
def __init__(self, *args, code=None, **kwargs):
|
||||
|
|
|
@ -317,10 +317,7 @@ class DomainNameserversView(DomainFormBaseView):
|
|||
# NamserverErrors *should* be caught in form; if reached here,
|
||||
# there was an uncaught error in submission (through EPP)
|
||||
messages.error(
|
||||
self.request,
|
||||
NameserverError(
|
||||
code=nsErrorCodes.UNABLE_TO_UPDATE_DOMAIN
|
||||
)
|
||||
self.request, NameserverError(code=nsErrorCodes.UNABLE_TO_UPDATE_DOMAIN)
|
||||
)
|
||||
logger.error(f"Nameservers error: {Err}")
|
||||
# TODO: registry is not throwing an error when no connection
|
||||
|
@ -328,17 +325,12 @@ class DomainNameserversView(DomainFormBaseView):
|
|||
if Err.is_connection_error():
|
||||
messages.error(
|
||||
self.request,
|
||||
GenericError(
|
||||
code=GenericErrorCodes.CANNOT_CONTACT_REGISTRY
|
||||
)
|
||||
GenericError(code=GenericErrorCodes.CANNOT_CONTACT_REGISTRY),
|
||||
)
|
||||
logger.error(f"Registry connection error: {Err}")
|
||||
else:
|
||||
messages.error(
|
||||
self.request,
|
||||
GenericError(
|
||||
code=GenericErrorCodes.GENERIC_ERROR
|
||||
)
|
||||
self.request, GenericError(code=GenericErrorCodes.GENERIC_ERROR)
|
||||
)
|
||||
logger.error(f"Registry error: {Err}")
|
||||
else:
|
||||
|
@ -707,9 +699,7 @@ class DomainSecurityEmailView(DomainFormBaseView):
|
|||
if contact is None:
|
||||
messages.error(
|
||||
self.request,
|
||||
GenericError(
|
||||
code=GenericErrorCodes.CANNOT_CONTACT_REGISTRY
|
||||
)
|
||||
GenericError(code=GenericErrorCodes.CANNOT_CONTACT_REGISTRY),
|
||||
)
|
||||
return redirect(self.get_success_url())
|
||||
|
||||
|
@ -721,25 +711,17 @@ class DomainSecurityEmailView(DomainFormBaseView):
|
|||
if Err.is_connection_error():
|
||||
messages.error(
|
||||
self.request,
|
||||
GenericError(
|
||||
code=GenericErrorCodes.CANNOT_CONTACT_REGISTRY
|
||||
)
|
||||
GenericError(code=GenericErrorCodes.CANNOT_CONTACT_REGISTRY),
|
||||
)
|
||||
logger.error(f"Registry connection error: {Err}")
|
||||
else:
|
||||
messages.error(
|
||||
self.request,
|
||||
GenericError(
|
||||
code=GenericErrorCodes.GENERIC_ERROR
|
||||
)
|
||||
self.request, GenericError(code=GenericErrorCodes.GENERIC_ERROR)
|
||||
)
|
||||
logger.error(f"Registry error: {Err}")
|
||||
except ContactError as Err:
|
||||
messages.error(
|
||||
self.request,
|
||||
GenericError(
|
||||
code=GenericErrorCodes.GENERIC_ERROR
|
||||
)
|
||||
self.request, GenericError(code=GenericErrorCodes.GENERIC_ERROR)
|
||||
)
|
||||
logger.error(f"Generic registry error: {Err}")
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue