mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-14 05:29:43 +02:00
Update domain_helper.py
This commit is contained in:
parent
6040e3e312
commit
2e4fb737e3
1 changed files with 3 additions and 3 deletions
|
@ -31,9 +31,9 @@ class DomainHelper:
|
||||||
"""Attempt to determine if a domain name could be requested."""
|
"""Attempt to determine if a domain name could be requested."""
|
||||||
|
|
||||||
# Split into pieces for the linter
|
# Split into pieces for the linter
|
||||||
cls._throw_err_if_domain_is_string(domain)
|
cls._throw_err_if_domain_is_not_valid_string(domain)
|
||||||
|
|
||||||
domain = domain.lower().strip()
|
domain = domain.lower().strip() # type: ignore
|
||||||
|
|
||||||
if domain == "" and not blank_ok:
|
if domain == "" and not blank_ok:
|
||||||
raise errors.BlankValueError()
|
raise errors.BlankValueError()
|
||||||
|
@ -58,7 +58,7 @@ class DomainHelper:
|
||||||
return domain
|
return domain
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _throw_err_if_domain_is_string(domain):
|
def _throw_err_if_domain_is_not_valid_string(domain):
|
||||||
"""Throws an error if a domain string is not a string"""
|
"""Throws an error if a domain string is not a string"""
|
||||||
|
|
||||||
if domain is None:
|
if domain is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue