Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove account requirements #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minsis
Copy link

@minsis minsis commented Oct 3, 2021

Fixes #45

@CLAassistant
Copy link

CLAassistant commented May 11, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the change to config.schema.yaml is enough? I'd have expected when the schema performed a
self._parse_accounts(self._config['imap_accounts'])
then it would get back None.

Therefore when it then tried to iterate through None it would get an uniniterable type.

So I would think the two sensor files would need to change to in the config, set it to [] if its not set.

Then the pack.yaml and CHANGES.md also needs an update.

@minsis
Copy link
Author

minsis commented Sep 30, 2022

Maybe? I thought a poller would only start if there was an associated rule trying to use it. So if you never created a rule to use it, the poller wouldn't start.

Also, there's already logic surrounding it:

if 'imap_accounts' in self._config:

@nzlosh
Copy link
Contributor

nzlosh commented Sep 7, 2023

imap_accounts might be able to be made optional but smtp_accounts is a required part of the send_email code.

accounts = self.config.get('smtp_accounts', None)
if accounts is None:
raise ValueError('"smtp_accounts" config value is required to send email.')
if not accounts:
raise ValueError('at least one account is required to send email.')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IMAP accounts required when not used
4 participants