Clean up before major release #58
2 changed files with 3 additions and 8 deletions
|
@ -212,8 +212,7 @@ class _SMTPChecker(SMTP):
|
|||
return `True`, else raise exceptions described in `mx_check`.
|
||||
"""
|
||||
for host in hosts:
|
||||
if self.debuglevel > 0:
|
||||
LOGGER.debug(msg=f'Trying {host} ...')
|
||||
LOGGER.debug(msg=f'Trying {host} ...')
|
||||
if self._check_one(host=host):
|
||||
return True
|
||||
# Raise appropriate exceptions when necessary
|
||||
|
|
|
@ -63,12 +63,8 @@ def validate_email(email_address: str, *args, **kwargs):
|
|||
try:
|
||||
return validate_email_or_fail(email_address, *args, **kwargs)
|
||||
except SMTPTemporaryError as error:
|
||||
message = f'Validation for {email_address!r} ambigious: {error}'
|
||||
if kwargs.get('debug'):
|
||||
LOGGER.warning(msg=message)
|
||||
LOGGER.info(msg=f'Validation for {email_address!r} ambigious: {error}')
|
||||
return
|
||||
except EmailValidationError as error:
|
||||
message = f'Validation for {email_address!r} failed: {error}'
|
||||
if kwargs.get('debug'):
|
||||
LOGGER.warning(msg=message)
|
||||
LOGGER.info(msg=f'Validation for {email_address!r} failed: {error}')
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue