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

Some parameters with default values throw AttributeError when not set #1580

Closed
gethvi opened this issue Jul 13, 2020 · 2 comments
Closed

Some parameters with default values throw AttributeError when not set #1580

gethvi opened this issue Jul 13, 2020 · 2 comments

Comments

@gethvi
Copy link
Contributor

gethvi commented Jul 13, 2020

If I omit some parameters from the configuration (that are supposed to have default values, e.g. mail_ssl (True) for intelmq.bots.collectors.mail and delimiter (,) for intelmq.bots.parsers.generic.csv), I get an AttributeError:

Bot has found a problem.
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/intelmq/lib/bot.py", line 269, in start
    self.process()
  File "/usr/local/lib/python3.5/dist-packages/intelmq/bots/collectors/mail/lib.py", line 40, in process
    mailbox = self.connect_mailbox()
  File "/usr/local/lib/python3.5/dist-packages/intelmq/bots/collectors/mail/lib.py", line 33, in connect_mailbox
    self.parameters.mail_ssl,
AttributeError: 'Parameters' object has no attribute 'mail_ssl'

This is also reason why in #1571 I explicitly mentioned missing delimiter.

I only came across mail_ssl and delimiter lately when I wanted to count on their default value. There might be more parameters with this behavior.

@ghost
Copy link

ghost commented Jul 13, 2020

I think this is a duplicate of #757

@ghost
Copy link

ghost commented Oct 21, 2020

Duplicate of #757

@ghost ghost marked this as a duplicate of #757 Oct 21, 2020
@ghost ghost closed this as completed Oct 21, 2020
This issue was closed.
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

No branches or pull requests

1 participant