Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shorten warning message
Browse files Browse the repository at this point in the history
firstof9 committed Jun 22, 2024
1 parent 76ff704 commit e63e2aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/mail_and_packages/helpers.py
Original file line number Diff line number Diff line change
@@ -86,6 +86,7 @@
SHIPPERS,
)

NO_SSL = "Email will be accessed without encryption using this method and is not recommended."
_LOGGER = logging.getLogger(__name__)

# Config Flow Helpers
@@ -136,9 +137,7 @@ async def _test_login(
account = imaplib.IMAP4(host=host, port=port)
account.starttls(context)
else:
_LOGGER.warning(
"Email will be accessed without encryption using this method and is not recommended."
)
_LOGGER.warning(NO_SSL)
account = imaplib.IMAP4(host=host, port=port)
except Exception as err:
_LOGGER.error("Error connecting into IMAP Server: %s", str(err))

0 comments on commit e63e2aa

Please sign in to comment.