Clean up before major release #58

Merged
reinhard-mueller merged 3 commits from master into pull-55 2021-03-07 12:59:25 +01:00
2 changed files with 3 additions and 8 deletions
Showing only changes of commit a0f1cd1b04 - Show all commits

View file

@ -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

View file

@ -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