Merge pull request #75 from pomma89/ambigious-typo

"ambigious" typo
This commit is contained in:
László Károlyi 2021-07-24 10:42:47 +00:00 committed by GitHub
commit 3f48c066d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ def validate_email_or_fail(
) -> Optional[bool]: ) -> Optional[bool]:
""" """
Return `True` if the email address validation is successful, `None` Return `True` if the email address validation is successful, `None`
if the validation result is ambigious, and raise an exception if the if the validation result is ambiguous, and raise an exception if the
validation fails. validation fails.
""" """
email_address = EmailAddress(address=email_address) email_address = EmailAddress(address=email_address)
@ -64,12 +64,12 @@ def validate_email(email_address: str, **kwargs):
Return `True` or `False` depending if the email address exists Return `True` or `False` depending if the email address exists
or/and can be delivered. or/and can be delivered.
Return `None` if the result is ambigious. Return `None` if the result is ambiguous.
""" """
try: try:
return validate_email_or_fail(email_address, **kwargs) return validate_email_or_fail(email_address, **kwargs)
except SMTPTemporaryError as error: except SMTPTemporaryError as error:
LOGGER.info(msg=f'Validation for {email_address!r} ambigious: {error}') LOGGER.info(msg=f'Validation for {email_address!r} is ambiguous: {error}')
return return
except EmailValidationError as error: except EmailValidationError as error:
LOGGER.info(msg=f'Validation for {email_address!r} failed: {error}') LOGGER.info(msg=f'Validation for {email_address!r} failed: {error}')